mirror of
https://github.com/PlayEdu/backend
synced 2025-06-08 02:54:09 +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 { useNavigate } from "react-router-dom";
|
||||
import styles from "./index.module.less";
|
||||
|
||||
export const ErrorPage: React.FC<any> = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<div id="error-page">
|
||||
<h1>Oops!</h1>
|
||||
<p>路由不存在</p>
|
||||
</div>
|
||||
<Result
|
||||
status="404"
|
||||
title="404"
|
||||
subTitle="您访问的页面不存在"
|
||||
className={styles["main"]}
|
||||
extra={
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
navigate("/");
|
||||
}}
|
||||
>
|
||||
返回首页
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user