Browse Source

update: 移除404的回到首页按钮

xyh 2 năm trước cách đây
mục cha
commit
93346d8e6b
1 tập tin đã thay đổi với 1 bổ sung13 xóa
  1. 1 13
      packages/app/src/pages/not-found/index.tsx

+ 1 - 13
packages/app/src/pages/not-found/index.tsx

@@ -1,16 +1,9 @@
-import {HOME_PATH} from '@routes';
 import css from './index.module.css';
-import {Button, Result} from 'antd';
+import {Result} from 'antd';
 import classNames from 'classnames';
 import {FC} from 'react';
-import {useNavigate} from 'react-router-dom';
 
 const NotFound: FC = function () {
-  const navigate = useNavigate();
-  function onClick() {
-    navigate(HOME_PATH, {replace: true});
-  }
-
   return (
     <main className={classNames(['container', css.main])}>
       <Result
@@ -18,11 +11,6 @@ const NotFound: FC = function () {
         status='404'
         title='404'
         subTitle='没有找到页面~'
-        extra={
-          <Button type='primary' onClick={onClick}>
-            回到首页
-          </Button>
-        }
       />
     </main>
   );