diff --git a/src/routes/index.ts b/src/routes/index.ts index a4501f6..64beed0 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -32,6 +32,14 @@ const routes: RouteData[] = [ { path: "", component: () => import("./auth/layout.vue"), + beforeEnter: (to, from, next) => { + const auth = useAuthStore(); + if (auth.user) { + next({ name: "overview" }); + } else { + next(); + } + }, children: [ { path: "login",