diff --git a/components/sidebar/items/chat/chat-item.tsx b/components/sidebar/items/chat/chat-item.tsx index 6ffdfaa..60c6abe 100644 --- a/components/sidebar/items/chat/chat-item.tsx +++ b/components/sidebar/items/chat/chat-item.tsx @@ -33,7 +33,8 @@ export const ChatItem: FC = ({ 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()