This commit is contained in:
parent
bddd42e0db
commit
cc5960866e
|
|
@ -11,8 +11,11 @@ const isValidLocale = (locale: string): boolean => {
|
||||||
|
|
||||||
export default function HomeRedirector() {
|
export default function HomeRedirector() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const pathname = usePathname()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (pathname !== '/') return
|
||||||
|
|
||||||
const preferred = localStorage.getItem('preferred-language')
|
const preferred = localStorage.getItem('preferred-language')
|
||||||
const currentPath = window.location.pathname
|
const currentPath = window.location.pathname
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue