Add 404 page

This commit is contained in:
Willian Mitsuda 2022-01-31 15:53:25 -03:00
parent e6d60f1fcd
commit 17194c089a
2 changed files with 23 additions and 1 deletions

View File

@ -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={<Address />}
/>
<Route path="*" element={<Home />} />
<Route path="*" element={<PageNotFound />} />
</Route>
</Routes>
</Router>

16
src/PageNotFound.tsx Normal file
View File

@ -0,0 +1,16 @@
import React from "react";
import { NavLink } from "react-router-dom";
import StandardFrame from "./StandardFrame";
const PageNotFound: React.FC = () => (
<StandardFrame>
<div className="border h-full m-auto flex flex-col justify-center items-center space-y-10">
<span className="text-4xl">Page not found!</span>
<NavLink className="text-link-blue hover:text-link-blue-hover" to="/">
Click here to go to home
</NavLink>
</div>
</StandardFrame>
);
export default PageNotFound;