This commit is contained in:
parent
fe3be01571
commit
19f0d27fcf
|
|
@ -33,7 +33,8 @@ export const ChatItem: FC<ChatItemProps> = ({ chat }) => {
|
||||||
const locales = i18nConfig.locales
|
const locales = i18nConfig.locales
|
||||||
const defaultLocale = i18nConfig.defaultLocale
|
const defaultLocale = i18nConfig.defaultLocale
|
||||||
|
|
||||||
const pathLocale = locales.includes(pathSegments[0]) ? pathSegments[0] : null
|
const segment = pathSegments[0] as (typeof locales)[number]
|
||||||
|
const pathLocale = locales.includes(segment) ? segment : null
|
||||||
const localePrefix = pathLocale && pathLocale !== defaultLocale ? `/${pathLocale}` : ""
|
const localePrefix = pathLocale && pathLocale !== defaultLocale ? `/${pathLocale}` : ""
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue