Avoid loading user info twice to show profile.

This commit is contained in:
Leo Vasanko 2025-08-06 10:57:41 -06:00
parent ba5f2d8bd9
commit 74ba443d3d

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 }