Skip to content

Commit 2bab89c

Browse files
committed
Hide Login link in Sidebar via config.menu.login=false
1 parent 23f3b1f commit 2bab89c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/components/Menu/MenuHeader.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ export default (props) => {
4848
return (
4949
<MenuHeader>
5050
<MenuHeaderContainer>
51-
<AccountLink to={profileLink} onClick={() => Store.dispatch(toggle())}>
52-
<AccountIcon />
53-
{profileLabel}
54-
</AccountLink>
51+
{config.menu?.login !== false && (
52+
<AccountLink
53+
to={profileLink}
54+
onClick={() => Store.dispatch(toggle())}
55+
>
56+
<AccountIcon />
57+
{profileLabel}
58+
</AccountLink>
59+
)}
5560
<MenuCloseButton />
5661
</MenuHeaderContainer>
5762
</MenuHeader>

src/config/eichwalde/menu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { routes } from './routes';
66
export const menu: ConfigMenu = {
77
size: 325,
88
profileLabel: 'Zum Profil',
9+
login: false,
910
loginLabel: 'Login',
1011
logo: false,
1112
twitter: false,

src/config/types/ConfigMenu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type MenuItem = Link | ExternalLink | Separator | Plus;
4040
export type ConfigMenu = {
4141
size: number;
4242
profileLabel: string;
43-
login?: boolean;
43+
login?: false | undefined;
4444
loginLabel: string;
4545
logo?: boolean;
4646
twitter?: boolean;

0 commit comments

Comments
 (0)