From 8bbfbe89590c7756ce7654260fe9e3d45d2290fa Mon Sep 17 00:00:00 2001 From: secondl1ght <85003930+secondl1ght@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:14:48 -0600 Subject: [PATCH] fix: only set initial document state on client --- src/components/LanguageToggle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LanguageToggle.tsx b/src/components/LanguageToggle.tsx index fcbf1f1a..5e1b7337 100644 --- a/src/components/LanguageToggle.tsx +++ b/src/components/LanguageToggle.tsx @@ -30,7 +30,7 @@ export function LanguageToggle() { const { refresh } = useRouter(); const [language, setLanguage] = useState( - getCookie() + typeof window !== 'undefined' ? getCookie() : undefined ); return (