refactor: go to Error404

This commit is contained in:
oat_dev 2024-07-01 10:21:21 +07:00
parent 471883e5e5
commit 6ab696fd60

View file

@ -29,19 +29,33 @@ const route: RouteRecordRaw[] = [
if (itemExists) {
next();
} else {
next({ name: "Error404NotFound" });
next({
name: "Error404NotFound",
params: { pathMatch: to.path.substring(1).split("/") },
});
}
},
},
{
path: "/:name",
name: "Pages",
path: "/build-and-deploy",
name: "BuildAndDeploy",
component: () => import("@/modules/02_pages/MainPage.vue"),
},
{
path: "/debug",
name: "Debug",
component: () => import("@/modules/02_pages/MainPage.vue"),
},
// {
// path: "/:name",
// name: "Pages",
// component: () => import("@/modules/02_pages/MainPage.vue"),
// },
{
path: "/:pathMatch(.*)*",
name: "Error404NotFound",
component: Error404NotFound,
props: true,
},
];