Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

remove locale code from SharePage

Francis Caof47e1072d9d0
diff --git a/src/app/share/[...shareId]/SharePage.tsx b/src/app/share/[...shareId]/SharePage.tsx
index c1da21682..7ed066735 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) {