fix chain modal
Some checks failed
Deploy / deploy (build, debian, 22) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822) (push) Has been cancelled

This commit is contained in:
2026-04-30 09:42:38 -06:00
parent dd249c8753
commit 375a78b852
6 changed files with 35 additions and 67 deletions

View File

@@ -68,12 +68,10 @@ export const router = createRouter({
routes,
})
router.beforeEach((to, from, next) => {
router.beforeEach((to) => {
const isLoggedIn = localStorage.getItem(STORAGE_KEY.LOGIN) === "true"
if (to.meta.auth && !isLoggedIn) {
loginModal.value = true
next(false)
} else {
next()
return false
}
})