From da84ac33498d06355a0776a9856009357efea64f Mon Sep 17 00:00:00 2001 From: zurdi Date: Fri, 11 Aug 2023 20:08:17 +0200 Subject: [PATCH] no match routes redirect to home dashboard --- frontend/src/plugins/router.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/plugins/router.js b/frontend/src/plugins/router.js index c5599f730..332a2107a 100644 --- a/frontend/src/plugins/router.js +++ b/frontend/src/plugins/router.js @@ -39,6 +39,7 @@ const routes = [ }, { path: "/:pathMatch(.*)*", + name: "noMatch", component: () => import("@/views/Dashboard.vue"), }, ], @@ -59,6 +60,8 @@ router.beforeEach(async (to, from) => { return { name: "login" }; } else if (isAuthenticated() && to.name === "login") { return { name: "dashboard" }; + } else if (to.name == "noMatch"){ + return { name: "dashboard" }; } });