Skip to content

Commit

Permalink
feat: add header-actions-extra slot
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Aug 13, 2024
1 parent 54764a9 commit 24e78c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/slots/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import LangSwitch from './LangSwitch';
import ThemeSwitch from './ThemeSwitch';

const Header = memo(() => {
const hasHeader = useSiteStore((s) => Boolean(s.routeMeta.frontmatter));
const hasHeader = useSiteStore(s => Boolean(s.routeMeta.frontmatter));

const { mobile } = useResponsive();
if (!hasHeader) return;
Expand All @@ -23,13 +23,17 @@ const Header = memo(() => {
<Head
actions={
mobile ? (
<ThemeSwitch />
<>
<ThemeSwitch />
<div id="header-actions-extra"></div>
</>
) : (
<>
<SearchBar /> <LangSwitch />
<GithubButton />
<DiscordButton />
<ThemeSwitch />
<div id="header-actions-extra"></div>
</>
)
}
Expand Down

0 comments on commit 24e78c2

Please sign in to comment.