Skip to content

Commit

Permalink
Hide footer menu if there's nothing to display (shuding#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
niikeec authored Jan 30, 2023
1 parent da585a8 commit 4d42bb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nextra-theme-docs/src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export function Footer({ menu }: { menu?: boolean }): ReactElement {
<div
className={cn(
'nx-mx-auto nx-flex nx-max-w-[90rem] nx-gap-2 nx-py-2 nx-px-4',
menu ? 'nx-flex' : 'nx-hidden'
menu && (config.i18n.length > 0 || config.darkMode)
? 'nx-flex'
: 'nx-hidden'
)}
>
{config.i18n.length > 0 && <LocaleSwitch options={config.i18n} />}
Expand Down

0 comments on commit 4d42bb4

Please sign in to comment.