This commit is contained in:
parent
cc5960866e
commit
ec9a1cbe31
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue