Fix type errors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
const { locale, locales, t } = useI18n();
|
||||
|
||||
const switchLocalePath = useSwitchLocalePath();
|
||||
const availableLocales = computed(() => {
|
||||
return locales.value.filter((i) => i.code !== locale.value);
|
||||
});
|
||||
@@ -14,7 +15,7 @@ function l(locale: (typeof locales.value)[0]) {
|
||||
<VaSidebarItem
|
||||
v-for="loc in availableLocales"
|
||||
:key="loc.code"
|
||||
:to="$switchLocalePath(loc.code)"
|
||||
:to="switchLocalePath(loc.code)"
|
||||
:title="t('layouts.switch_lang', { locale: t(`locales.${l(loc)}`) })"
|
||||
>
|
||||
<VaSidebarItemContent>
|
||||
|
||||
Reference in New Issue
Block a user