From e5762bb70192cdc894685530f53f6645536705c8 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 9 May 2020 14:44:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(portal):=20=E5=A2=9E=E5=8A=A0404=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/portal/App.tsx | 3 ++- src/portal/routes/404.tsx | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/portal/routes/404.tsx diff --git a/src/portal/App.tsx b/src/portal/App.tsx index 69711327d..a8ddbc641 100644 --- a/src/portal/App.tsx +++ b/src/portal/App.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Router, Switch, Route, RouteProps } from 'react-router'; - import { postMessage } from '@portal/utils/event'; import history from './history'; import { routes } from './routes'; +import NotFound from './routes/404'; interface TitleRouteProps extends RouteProps { title: string; @@ -38,6 +38,7 @@ class App extends React.Component { {routes.map((config) => ( ))} + ); diff --git a/src/portal/routes/404.tsx b/src/portal/routes/404.tsx new file mode 100644 index 000000000..23af04c14 --- /dev/null +++ b/src/portal/routes/404.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { TMemo } from '@shared/components/TMemo'; + +const NotFound: React.FC = TMemo(() => { + return ( +
+

页面没找到

+
+ ); +}); +NotFound.displayName = 'NotFound'; + +export default NotFound;