diff --git a/components/utility/home-redirector.tsx b/components/utility/home-redirector.tsx index 41fe1b8..776d345 100644 --- a/components/utility/home-redirector.tsx +++ b/components/utility/home-redirector.tsx @@ -11,8 +11,11 @@ const isValidLocale = (locale: string): boolean => { export default function HomeRedirector() { const router = useRouter() + const pathname = usePathname() useEffect(() => { + if (pathname !== '/') return + const preferred = localStorage.getItem('preferred-language') const currentPath = window.location.pathname