Skip to content

Commit

Permalink
feat(project): add custom menu label to sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed Nov 6, 2024
1 parent adf388c commit 002479d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const SidebarUserActions = ({
};

const SidebarContainer = () => {
const { t } = useTranslation('common');
const { t, i18n } = useTranslation('common');
const language = i18n.language;
const navigate = useNavigate();
const location = useLocation();

Expand Down Expand Up @@ -82,9 +83,9 @@ const SidebarContainer = () => {
<li>
<MenuButton label={t('home')} to="/" />
</li>
{menu.map(({ contentId, type, label }) => (
{menu.map(({ contentId, type, label, custom }) => (
<li key={contentId}>
<MenuButton label={label} to={determinePath({ type, contentId })} />
<MenuButton label={custom?.[`label-${language}`] || label} to={determinePath({ type, contentId })} />
</li>
))}
</ul>
Expand Down

0 comments on commit 002479d

Please sign in to comment.