err handl

This commit is contained in:
2025-08-08 01:02:17 +07:00
parent d0f517a0f9
commit 921de8e19c
3 changed files with 14 additions and 10 deletions
+4 -3
View File
@@ -45,7 +45,7 @@
<div>
<img :src="currentFlag" alt="image" class="h-5 w-5 rounded-full object-cover" />
</div>
<div class="text-base font-bold uppercase">{{ store.locale }}</div>
<div v-if="store" class="text-base font-bold uppercase">{{ store.locale }}</div>
<span class="shrink-0">
<icon-caret-down />
</span>
@@ -192,7 +192,8 @@
definePageMeta({
layout: 'auth-layout',
});
const store = useAppStore();
// const store = useAppStore();
const store = process.client ? useAppStore() : null;
const { setLocale } = useI18n();
const config = useRuntimeConfig();
const auth = useAuthStore();
@@ -202,7 +203,7 @@
appSetting.toggleLanguage(item, setLocale);
};
const currentFlag = computed(() => {
return `/assets/images/flags/${store.locale?.toUpperCase()}.svg`;
return store?.locale ?`/assets/images/flags/${store.locale?.toUpperCase()}.svg` : '';
});
const login = async () => {