From 2bab89c752d82393f7441f42127f0658a0bb9bb8 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 17 Mar 2022 22:09:52 +0100 Subject: [PATCH] Hide Login link in Sidebar via config.menu.login=false --- src/components/Menu/MenuHeader.js | 13 +++++++++---- src/config/eichwalde/menu.ts | 1 + src/config/types/ConfigMenu.ts | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/Menu/MenuHeader.js b/src/components/Menu/MenuHeader.js index 12f183020..963dd553e 100644 --- a/src/components/Menu/MenuHeader.js +++ b/src/components/Menu/MenuHeader.js @@ -48,10 +48,15 @@ export default (props) => { return ( - Store.dispatch(toggle())}> - - {profileLabel} - + {config.menu?.login !== false && ( + Store.dispatch(toggle())} + > + + {profileLabel} + + )} diff --git a/src/config/eichwalde/menu.ts b/src/config/eichwalde/menu.ts index 4c8a59de7..911e43be3 100644 --- a/src/config/eichwalde/menu.ts +++ b/src/config/eichwalde/menu.ts @@ -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, diff --git a/src/config/types/ConfigMenu.ts b/src/config/types/ConfigMenu.ts index 132e3ffbb..768c73122 100644 --- a/src/config/types/ConfigMenu.ts +++ b/src/config/types/ConfigMenu.ts @@ -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;