Skip to content

Commit

Permalink
fix locale dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed May 16, 2022
1 parent 686bf91 commit 611500e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ export default function LocaleDropdownNavbarItem({
to,
target: '_self',
autoAddBaseUrl: false,
isActive: () => locale === currentLocale,
className:
// eslint-disable-next-line no-nested-ternary
locale === currentLocale
? // Duplicated from DefaultNavbarItem: select the right Infima active
// class name. This cannot be substituted with isActive, because the
// target URLs contain `pathname://` and therefore are not NavLinks!
mobile
? 'menu__link--active'
: 'navbar__link--active'
: '',
};
});

Expand Down

0 comments on commit 611500e

Please sign in to comment.