feat: filter nav sidebar
This commit is contained in:
parent
d27045794a
commit
8dc6f2884f
@ -22,6 +22,7 @@
|
||||
"signUp": {
|
||||
"moderation": true
|
||||
},
|
||||
"hideFromNavbar": ["/graph"],
|
||||
"eventLinkPrefix": "nevent",
|
||||
"profileLinkPrefix": "nprofile",
|
||||
"defaultRelays": {
|
||||
|
1
packages/app/custom.d.ts
vendored
1
packages/app/custom.d.ts
vendored
@ -63,6 +63,7 @@ declare const CONFIG: {
|
||||
signUp: {
|
||||
moderation: boolean;
|
||||
};
|
||||
hideFromNavbar?: Array<string>;
|
||||
eventLinkPrefix: NostrPrefix;
|
||||
profileLinkPrefix: NostrPrefix;
|
||||
defaultRelays: Record<string, RelaySettings>;
|
||||
|
@ -80,7 +80,7 @@ export default function NavSidebar({ narrow = false }) {
|
||||
<LogoHeader showText={!narrow} />
|
||||
<div className="flex-grow flex flex-col justify-between">
|
||||
<div className={classNames({ "xl:items-start": !narrow }, "flex flex-col items-center font-bold text-lg")}>
|
||||
{MENU_ITEMS.map(item => {
|
||||
{MENU_ITEMS.filter(a => !(CONFIG.hideFromNavbar ?? []).includes(a.link)).map(item => {
|
||||
if (!item.nonLoggedIn && !publicKey) {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user