mirror of
https://github.com/PlayEdu/backend
synced 2025-06-24 01:02:49 +08:00
路由丢失页添加
This commit is contained in:
parent
569d478e15
commit
0bf57e8b6c
0
src/pages/error/Error.module.css
Normal file
0
src/pages/error/Error.module.css
Normal file
@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
import styles from "./Error.module.css";
|
||||
|
||||
export const ErrorPage: React.FC<any> = () => {
|
||||
return (
|
1
src/pages/error/index.ts
Normal file
1
src/pages/error/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "./Error";
|
@ -1,3 +1,4 @@
|
||||
export * from "./home";
|
||||
export * from "./login";
|
||||
export * from "./dashboard";
|
||||
export * from "./error";
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user