优化404页面

This commit is contained in:
none 2023-03-07 15:09:34 +08:00
parent 75921f6e10
commit 70a56dbd39
2 changed files with 24 additions and 4 deletions

View File

@ -0,0 +1,4 @@
.main {
width: 100vw;
height: 100vh;
}

View File

@ -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>
}
/>
);
};