Przeglądaj źródła

fix: 404 Component is missing (#592)

* fix: 404 Component is missing

* chore: update 404 page style

---------

Co-authored-by: JustSong <[email protected]>
Mikey 2 lat temu
rodzic
commit
e338de45b6
2 zmienionych plików z 8 dodań i 13 usunięć
  1. 3 1
      web/src/App.js
  2. 5 12
      web/src/pages/NotFound/index.js

+ 3 - 1
web/src/App.js

@@ -283,7 +283,9 @@ function App() {
           </Suspense>
         }
       />
-      <Route path='*' element={NotFound} />
+      <Route path='*' element={
+          <NotFound />
+      } />
     </Routes>
   );
 }

+ 5 - 12
web/src/pages/NotFound/index.js

@@ -1,19 +1,12 @@
 import React from 'react';
-import { Segment, Header } from 'semantic-ui-react';
+import { Message } from 'semantic-ui-react';
 
 const NotFound = () => (
   <>
-    <Header
-      block
-      as="h4"
-      content="404"
-      attached="top"
-      icon="info"
-      className="small-icon"
-    />
-    <Segment attached="bottom">
-      未找到所请求的页面
-    </Segment>
+    <Message negative>
+      <Message.Header>页面不存在</Message.Header>
+      <p>请检查你的浏览器地址是否正确</p>
+    </Message>
   </>
 );