Skip to content

Commit

Permalink
fix: Additional nav guarding just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
25Ericcheong committed May 18, 2024
1 parent 8ffe0da commit 69f02ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ const PATHS = {
};

const routes = [
{ path: PATHS.HOME, component: Home },
{ path: PATHS.MENU, component: Menu },
{ name: "home", path: PATHS.HOME, component: Home },
{ name: "menu", path: PATHS.MENU, component: Menu },
];

const router = createRouter({
history: createWebHistory(),
routes,
});

router.onError(() => {
return { name: "home", path: PATHS.HOME, component: Home };
});

export { PATHS, router };

0 comments on commit 69f02ea

Please sign in to comment.