This commit is contained in:
parent
5b4116dfe7
commit
138daa7458
|
|
@ -13,12 +13,13 @@ export default function HomeRedirector() {
|
|||
|
||||
if (
|
||||
preferred &&
|
||||
i18nConfig.locales.includes(preferred) &&
|
||||
(i18nConfig.locales as string[]).includes(preferred) &&
|
||||
!currentPath.startsWith(`/${preferred}/`)
|
||||
) {
|
||||
const newPath = `/${preferred}${currentPath}`
|
||||
router.replace(newPath)
|
||||
}
|
||||
|
||||
}, [])
|
||||
|
||||
return null
|
||||
|
|
|
|||
Loading…
Reference in New Issue