From 45ed7731193d530cfae9c84625b973a70d4eda43 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Sun, 28 Jun 2026 22:10:34 +0200 Subject: [PATCH] fix a couple of things --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8cc01e4..abf4e7a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,10 +17,11 @@ const router = createRouter({ }); app.use(pinia); -app.use(router); const authStore = useAuthStore(); +await authStore.bootstrap(); + router.beforeEach(to => { if (!to.meta.public && !authStore.isAuthenticated) { return {name: routeNames.home}; @@ -28,4 +29,5 @@ router.beforeEach(to => { return true; }); -authStore.bootstrap().finally(() => app.mount('#app')); \ No newline at end of file +app.use(router); +app.mount('#app'); \ No newline at end of file