From f47e1072d9d0c0ba9650cdd5eb1f458f6a1d472a Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Tue, 2 Dec 2025 16:10:11 -0800 Subject: [PATCH] remove locale code from SharePage --- src/app/share/[...shareId]/SharePage.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/share/[...shareId]/SharePage.tsx b/src/app/share/[...shareId]/SharePage.tsx index c1da2168..7ed06673 100644 --- a/src/app/share/[...shareId]/SharePage.tsx +++ b/src/app/share/[...shareId]/SharePage.tsx @@ -5,28 +5,21 @@ import { WebsiteHeader } from '@/app/(main)/websites/[websiteId]/WebsiteHeader'; import { WebsitePage } from '@/app/(main)/websites/[websiteId]/WebsitePage'; import { WebsiteProvider } from '@/app/(main)/websites/WebsiteProvider'; import { PageBody } from '@/components/common/PageBody'; -import { useLocale, useShareTokenQuery } from '@/components/hooks'; -import { languages } from '@/lib/lang'; +import { useShareTokenQuery } from '@/components/hooks'; import { Footer } from './Footer'; import { Header } from './Header'; export function SharePage({ shareId }) { const { shareToken, isLoading } = useShareTokenQuery(shareId); const { setTheme } = useTheme(); - const { saveLocale } = useLocale(); useEffect(() => { const url = new URL(window?.location?.href); const theme = url.searchParams.get('theme'); - const locale = url.searchParams.get('locale'); if (theme === 'light' || theme === 'dark') { setTheme(theme); } - - if (Object.keys(languages).includes(locale)) { - saveLocale(locale); - } }, []); if (isLoading || !shareToken) {