路由丢失页添加

This commit is contained in:
禺狨
2023-03-02 14:31:16 +08:00
parent 569d478e15
commit 0bf57e8b6c
5 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import React from "react";
import { RouteObject } from "react-router-dom";
import { Login, HomePage, Dashboard } from "../pages";
import { Login, HomePage, Dashboard, ErrorPage } from "../pages";
const routes: RouteObject[] = [
{
@@ -17,6 +17,10 @@ const routes: RouteObject[] = [
path: "/login",
element: <Login />,
},
{
path: "*",
element: <ErrorPage />,
},
];
export default routes;