From bcfd8d155a958c7879994da85fb0b2dece786acf Mon Sep 17 00:00:00 2001 From: Brayden Langley Date: Wed, 2 Sep 2026 11:28:19 -0700 Subject: [PATCH] fix: hide admin navigation from non-admins --- src/client/main.tsx | 3 ++- src/client/navigation.test.ts | 17 +++++++++++++++++ src/client/navigation.ts | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/client/navigation.test.ts create mode 100644 src/client/navigation.ts diff --git a/src/client/main.tsx b/src/client/main.tsx index 3014487..d6def2a 100644 --- a/src/client/main.tsx +++ b/src/client/main.tsx @@ -33,6 +33,7 @@ import { speechChunks, type ReaderSpeechPreferences } from './readerSpeech' +import { shouldShowAdminNavigation } from './navigation' type WalletSubstrate = 'auto' | 'json-api' | 'secure-json-api' | 'react-native' | 'Cicada' | 'XDM' | 'window.CWI' @@ -1197,7 +1198,7 @@ function Shell ({ children, status }: { children: React.ReactNode, status: Statu About Reader settings Author - Admin + {shouldShowAdminNavigation(status?.isAdmin) && Admin}