diff --git a/components/utility/home-redirector.tsx b/components/utility/home-redirector.tsx index 776d345..90f4cfd 100644 --- a/components/utility/home-redirector.tsx +++ b/components/utility/home-redirector.tsx @@ -1,7 +1,7 @@ 'use client' import { useEffect } from 'react' -import { useRouter } from 'next/navigation' +import { useRouter, usePathname } from 'next/navigation' import i18nConfig from '@/i18nConfig' const isValidLocale = (locale: string): boolean => { @@ -15,7 +15,7 @@ export default function HomeRedirector() { useEffect(() => { if (pathname !== '/') return - + const preferred = localStorage.getItem('preferred-language') const currentPath = window.location.pathname