From 53558c4b46dd76e59ddf67eaa00d00ce06b366bb Mon Sep 17 00:00:00 2001 From: nquidox Date: Wed, 29 Oct 2025 20:58:16 +0300 Subject: [PATCH] fix --- src/stores/authStore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/authStore.js b/src/stores/authStore.js index 7cdfc82..cede1f1 100644 --- a/src/stores/authStore.js +++ b/src/stores/authStore.js @@ -1,5 +1,5 @@ import { defineStore } from 'pinia' -import { computed, ref } from 'vue' +import { computed, nextTick, ref } from 'vue' import { apiClient } from '@/services/apiClient' import router from '@/router/index.js' @@ -54,6 +54,7 @@ export const useAuthStore = defineStore('auth', () => { try { const response = await apiClient.post('/user/auth/login', { email, password }) setToken(response.data.access_token) + await nextTick() router.push({ name: 'collection'}) } catch (error) { console.error('Login error:', error)