Skip to content

Commit

Permalink
Hide Login link in Sidebar via config.menu.login=false
Browse files Browse the repository at this point in the history
  • Loading branch information
tordans committed Jul 6, 2022
1 parent 23f3b1f commit 2bab89c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/components/Menu/MenuHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ export default (props) => {
return (
<MenuHeader>
<MenuHeaderContainer>
<AccountLink to={profileLink} onClick={() => Store.dispatch(toggle())}>
<AccountIcon />
{profileLabel}
</AccountLink>
{config.menu?.login !== false && (
<AccountLink
to={profileLink}
onClick={() => Store.dispatch(toggle())}
>
<AccountIcon />
{profileLabel}
</AccountLink>
)}
<MenuCloseButton />
</MenuHeaderContainer>
</MenuHeader>
Expand Down
1 change: 1 addition & 0 deletions src/config/eichwalde/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { routes } from './routes';
export const menu: ConfigMenu = {
size: 325,
profileLabel: 'Zum Profil',
login: false,
loginLabel: 'Login',
logo: false,
twitter: false,
Expand Down
2 changes: 1 addition & 1 deletion src/config/types/ConfigMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type MenuItem = Link | ExternalLink | Separator | Plus;
export type ConfigMenu = {
size: number;
profileLabel: string;
login?: boolean;
login?: false | undefined;
loginLabel: string;
logo?: boolean;
twitter?: boolean;
Expand Down

0 comments on commit 2bab89c

Please sign in to comment.