fixed routing issue on logout

This commit is contained in:
2025-10-09 00:56:46 +02:00
parent 4f1452e0d9
commit 2c6d0859f6
5 changed files with 30 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
import { defineStore } from 'pinia';
import { useRouter } from 'vue-router'
export const useAuthStore = defineStore('auth', {
state: () => ({
@@ -15,7 +15,6 @@ export const useAuthStore = defineStore('auth', {
logout() {
this.user = null;
localStorage.removeItem('user');
useRouter().push('/');
}
}
});