Avoid loading user info twice to show profile.

This commit is contained in:
2025-08-06 22:57:41 +00:00
parent 82150be650
commit 764bbd1115
+1 -9
View File
@@ -86,15 +86,7 @@ import { registerCredential } from '@/utils/passkey'
const authStore = useAuthStore()
const updateInterval = ref(null)
onMounted(async () => {
try {
await authStore.loadUserInfo()
} catch (error) {
authStore.showMessage(`Failed to load user info: ${error.message}`, 'error')
authStore.currentView = 'login'
return
}
onMounted(() => {
updateInterval.value = setInterval(() => {
// Trigger Vue reactivity to update formatDate fields
authStore.currentUser = { ...authStore.currentUser }