Compare commits

...

2 commits

Author SHA1 Message Date
youssef shebl
fe2ea94805
Merge af78257418 into a65a9f5549 2025-01-02 00:37:03 +01:00
youssefshibl
af78257418 refactor: ♻️ add pattern to invalid route with redirect & message error 2024-03-22 00:10:27 +02:00

View file

@ -7,6 +7,8 @@ import DashboardHome from "./pages/DashboardHome.vue";
import Console from "./pages/Console.vue";
import Compose from "./pages/Compose.vue";
import ContainerTerminal from "./pages/ContainerTerminal.vue";
import { useToast } from "vue-toastification";
const toast = useToast();
const Settings = () => import("./pages/Settings.vue");
@ -92,6 +94,15 @@ const routes = [
path: "/setup",
component: Setup,
},
{
path: "/:pathMatch(.*)*",
redirect: (to) => {
setTimeout(() => {
toast.error("Page not found");
}, 100);
return "/";
},
}
];
export const router = createRouter({