Add prettier dependency to format frontend code

This commit is contained in:
2026-03-04 15:37:59 +01:00
parent 2d97aa85c4
commit af44849eda
31 changed files with 1166 additions and 1070 deletions

View File

@@ -31,13 +31,13 @@ export const router = createRouter({
})
router.beforeEach(async (to) => {
// redirect to login page if not logged in and trying to access a restricted page
const publicPages = ['/', '/login', '/signup'];
const authRequired = !publicPages.includes(to.path);
const auth = useAuthStore();
// redirect to login page if not logged in and trying to access a restricted page
const publicPages = ['/', '/login', '/signup']
const authRequired = !publicPages.includes(to.path)
const auth = useAuthStore()
if (authRequired && !auth.user) {
auth.returnUrl = to.fullPath;
return '/login';
}
});
if (authRequired && !auth.user) {
auth.returnUrl = to.fullPath
return '/login'
}
})