mirror of
https://github.com/PlayEdu/backend
synced 2025-06-08 19:04:08 +08:00
优化404页面
This commit is contained in:
parent
75921f6e10
commit
70a56dbd39
@ -0,0 +1,4 @@
|
|||||||
|
.main {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
@ -1,11 +1,27 @@
|
|||||||
|
import { Button, Result } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
import styles from "./index.module.less";
|
import styles from "./index.module.less";
|
||||||
|
|
||||||
export const ErrorPage: React.FC<any> = () => {
|
export const ErrorPage: React.FC<any> = () => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="error-page">
|
<Result
|
||||||
<h1>Oops!</h1>
|
status="404"
|
||||||
<p>路由不存在</p>
|
title="404"
|
||||||
</div>
|
subTitle="您访问的页面不存在"
|
||||||
|
className={styles["main"]}
|
||||||
|
extra={
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
navigate("/");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
返回首页
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user