From 17194c089a431a71c5b250a7e950cedeab7b89e7 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Mon, 31 Jan 2022 15:53:25 -0300 Subject: [PATCH] Add 404 page --- src/App.tsx | 8 +++++++- src/PageNotFound.tsx | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/PageNotFound.tsx diff --git a/src/App.tsx b/src/App.tsx index aae4ab8..62d3b2c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,6 +31,12 @@ const London = React.lazy( /* webpackChunkName: "london", webpackPrefetch: true */ "./special/london/London" ) ); +const PageNotFound = React.lazy( + () => + import( + /* webpackChunkName: "notfound", webpackPrefetch: true */ "./PageNotFound" + ) +); const App = () => { const runtime = useRuntime(); @@ -61,7 +67,7 @@ const App = () => { path="address/:addressOrName/*" element={
} /> - } /> + } /> diff --git a/src/PageNotFound.tsx b/src/PageNotFound.tsx new file mode 100644 index 0000000..690f0a0 --- /dev/null +++ b/src/PageNotFound.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import { NavLink } from "react-router-dom"; +import StandardFrame from "./StandardFrame"; + +const PageNotFound: React.FC = () => ( + +
+ Page not found! + + Click here to go to home + +
+
+); + +export default PageNotFound;