fix: call checkAuth on app mount to restore session from localStorage

This commit is contained in:
2026-01-16 17:13:53 +03:00
parent 80db9ede92
commit 635941f635

View File

@@ -21,8 +21,15 @@
</template>
<script setup lang="ts">
import { onMounted } from "vue";
import { useAuthStore } from "@/stores/auth";
const authStore = useAuthStore();
// Восстанавливаем сессию при загрузке приложения
onMounted(() => {
authStore.checkAuth();
});
</script>
<style scoped>