This commit is contained in:
hailin 2025-04-21 01:54:37 +08:00
parent fe3be01571
commit 19f0d27fcf
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ export const ChatItem: FC<ChatItemProps> = ({ chat }) => {
const locales = i18nConfig.locales
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 router = useRouter()