From f1fc3cbbc1b964072321c21dcce761e8fd0afaad Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 12 Jan 2025 17:33:10 -0600 Subject: [PATCH] Revert to naive times in CommandK menu --- src/components/cmdk/CommandKClient.tsx | 7 ++----- src/site/CommandK.tsx | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/cmdk/CommandKClient.tsx b/src/components/cmdk/CommandKClient.tsx index 6c36cd0a..bd598885 100644 --- a/src/components/cmdk/CommandKClient.tsx +++ b/src/components/cmdk/CommandKClient.tsx @@ -48,7 +48,6 @@ import CommandKItem from './CommandKItem'; import { GRID_HOMEPAGE_ENABLED } from '@/site/config'; import { DialogDescription, DialogTitle } from '@radix-ui/react-dialog'; import * as VisuallyHidden from '@radix-ui/react-visually-hidden'; -import { Timezone } from '@/utility/timezone'; const DIALOG_TITLE = 'Global Command-K Menu'; const DIALOG_DESCRIPTION = 'For searching photos, views, and settings'; @@ -77,13 +76,11 @@ export default function CommandKClient({ serverSections = [], showDebugTools, footer, - timezone, }: { tags: Tags serverSections?: CommandKSection[] showDebugTools?: boolean footer?: string - timezone: Timezone }) { const pathname = usePathname(); @@ -169,7 +166,7 @@ export default function CommandKClient({ items: photos.map(photo => ({ label: titleForPhoto(photo), keywords: getKeywordsForPhoto(photo), - annotation: , + annotation: , accessory: , path: pathForPhoto({ photo }), })), @@ -187,7 +184,7 @@ export default function CommandKClient({ setIsLoading(false); }); } - }, [queryDebounced, isPending, timezone]); + }, [queryDebounced, isPending]); useEffect(() => { if (queryLive === '') { diff --git a/src/site/CommandK.tsx b/src/site/CommandK.tsx index ddc42958..b47c2903 100644 --- a/src/site/CommandK.tsx +++ b/src/site/CommandK.tsx @@ -22,12 +22,8 @@ import { labelForFilmSimulation } from '@/vendors/fujifilm'; import { getUniqueFocalLengths } from '@/photo/db/query'; import { formatFocalLength } from '@/focal'; import { TbCone } from 'react-icons/tb'; -import { cookies } from 'next/headers'; -import { TIMEZONE_COOKIE_NAME } from '@/utility/timezone'; export default async function CommandK() { - const timezone = (await cookies()).get(TIMEZONE_COOKIE_NAME)?.value; - const [ count, tags, @@ -92,6 +88,5 @@ export default async function CommandK() { ]} showDebugTools={ADMIN_DEBUG_TOOLS_ENABLED} footer={photoQuantityText(count, false)} - timezone={timezone} />; }