mirror of
https://github.com/PlayEdu/backend
synced 2025-06-07 05:34:05 +08:00
路由
This commit is contained in:
parent
f0527002ff
commit
cd5ef9ad4b
10
src/pages/error/index.tsx
Normal file
10
src/pages/error/index.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import React from "react";
|
||||
|
||||
export const ErrorPage: React.FC<any> = () => {
|
||||
return (
|
||||
<div id="error-page">
|
||||
<h1>Oops!</h1>
|
||||
<p>路由不存在</p>
|
||||
</div>
|
||||
);
|
||||
};
|
10
src/routes/index.ts
Normal file
10
src/routes/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { createBrowserRouter } from "react-router-dom";
|
||||
import { ErrorPage } from "../pages/error";
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: "/",
|
||||
element: null
|
||||
},
|
||||
]);
|
||||
|
||||
export default router;
|
Loading…
x
Reference in New Issue
Block a user