Show page not found for invalid routes

This commit is contained in:
Louis Lam
2022-03-26 02:09:12 +08:00
parent 623d03dc6f
commit f6272155af
3 changed files with 105 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ import Backup from "./components/settings/Backup.vue";
import About from "./components/settings/About.vue";
import ManageStatusPage from "./pages/ManageStatusPage.vue";
import AddStatusPage from "./pages/AddStatusPage.vue";
import NotFound from "./pages/NotFound.vue";
const routes = [
{
@@ -128,6 +129,10 @@ const routes = [
path: "/status/:slug",
component: StatusPage,
},
{
path: "/:pathMatch(.*)*",
component: NotFound,
},
];
export const router = createRouter({