Add authentication check to auth layout route

This commit is contained in:
2026-01-05 15:04:29 +07:00
parent ba677a555c
commit 61509b794b

View File

@@ -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",