Fix erroneous auth check in CommandK
This commit is contained in:
parent
ef1c8fc79d
commit
39c924b3e0
@ -171,7 +171,7 @@ export default function CommandKClient({
|
||||
}],
|
||||
}];
|
||||
|
||||
if (showDebugTools) {
|
||||
if (isUserSignedIn && showDebugTools) {
|
||||
clientSections.push({
|
||||
heading: 'Debug Tools',
|
||||
accessory: <RiToolsFill size={16} className="translate-x-[-1px]" />,
|
||||
|
||||
@ -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: <FaTag
|
||||
@ -81,7 +76,7 @@ export default async function CommandK() {
|
||||
SECTION_CAMERAS,
|
||||
SECTION_FILM,
|
||||
]}
|
||||
showDebugTools={isAdminLoggedIn && ADMIN_DEBUG_TOOLS_ENABLED}
|
||||
showDebugTools={ADMIN_DEBUG_TOOLS_ENABLED}
|
||||
footer={photoQuantityText(count, false)}
|
||||
/>;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user