From 39c924b3e07705ade62969aee95b079b2f85345e Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 21 Apr 2024 22:46:07 -0500 Subject: [PATCH] Fix erroneous auth check in CommandK --- src/components/CommandKClient.tsx | 2 +- src/site/CommandK.tsx | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/CommandKClient.tsx b/src/components/CommandKClient.tsx index ac57654d..a7fee955 100644 --- a/src/components/CommandKClient.tsx +++ b/src/components/CommandKClient.tsx @@ -171,7 +171,7 @@ export default function CommandKClient({ }], }]; - if (showDebugTools) { + if (isUserSignedIn && showDebugTools) { clientSections.push({ heading: 'Debug Tools', accessory: , diff --git a/src/site/CommandK.tsx b/src/site/CommandK.tsx index e94a3f79..77c7f39e 100644 --- a/src/site/CommandK.tsx +++ b/src/site/CommandK.tsx @@ -11,7 +11,6 @@ import { pathForTag, } from './paths'; import { formatCameraText } from '@/camera'; -import { authCachedSafe } from '@/auth/cache'; import { photoQuantityText } from '@/photo'; import { formatCount, formatCountDescriptive } from '@/utility/string'; import { sortTagsObject } from '@/tag'; @@ -33,10 +32,6 @@ export default async function CommandK() { getUniqueFilmSimulationsCached().catch(() => []), ]); - const session = await authCachedSafe(); - - const isAdminLoggedIn = Boolean(session?.user?.email); - const SECTION_TAGS: CommandKSection = { heading: 'Tags', accessory: ; }