Skip to content

Commit

Permalink
hide wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Mar 14, 2024
1 parent 57d3489 commit a126c6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/nav.ts
Expand Up @@ -16,7 +16,7 @@ const navMenuPopover = Popover(
Box(
activeUser.$permission.map(() => Vertical(
Label("SWITCH TO").addClass("title"),
pages.map(([ logo, permission, route ]) => permCheck(...permission)
pages.map(([ logo, permission, route, login ]) => permCheck(...permission) && ((login && activeUser.id) || !login)
? Horizontal(
Image(logo, "Logo"),
Spacer(),
Expand Down
12 changes: 6 additions & 6 deletions components/pages.ts
Expand Up @@ -11,12 +11,12 @@ import bbnWalletLogo from '../assets/img/bbnWallet.svg';

import { Permission } from "shared/mod.ts";

export const pages: [ logo: string, perm: Array<Permission>, route: string ][] = [
[ bbnHolding, [], "/" ],
[ bbnMusicLogo, [], "/music" ],
[ bbnHostingLogo, [], "/hosting" ],
[ bbnWalletLogo, [], "/wallet" ],
[ bbnAdminLogo, [ "/bbn/manage", "/hmsys/user" ], "/admin" ],
export const pages: [ logo: string, perm: Array<Permission>, route: string, login: boolean ][] = [
[ bbnHolding, [], "/", false ],
[ bbnMusicLogo, [], "/music", false ],
[ bbnHostingLogo, [], "/hosting", false ],
[ bbnWalletLogo, [], "/wallet", true ],
[ bbnAdminLogo, [ "/bbn/manage", "/hmsys/user" ], "/admin", true ],
];

// Moved this to the up array when we use the hmsys permission system
Expand Down

0 comments on commit a126c6b

Please sign in to comment.