Skip to content

Commit 9165208

Browse files
committed
Not found page added
1 parent e9cdd97 commit 9165208

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import LineChartPage from "./pages/line"
1010
import ChoroplethPage from "./pages/geo"
1111

1212
import "./main.css"
13+
import NotFound from "./pages/404"
1314

1415
const router = createBrowserRouter([
1516
{
@@ -32,6 +33,10 @@ const router = createBrowserRouter([
3233
path: "/geo/",
3334
element: <ChoroplethPage />,
3435
},
36+
{
37+
path: "*",
38+
element: <NotFound />,
39+
},
3540
])
3641

3742
ReactDOM.createRoot(document.getElementById("root")!).render(

src/pages/404.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from "react"
2+
3+
interface Props {}
4+
5+
const NotFound: React.FC<Props> = () => {
6+
return (
7+
<div className="h-screen grid place-content-center text-center">
8+
<div className="bg-neutral-950 p-5">
9+
<h1 className="font-semibold text-xl mb-1">Not Found</h1>
10+
<p>the page you're looking for doesn't exists.</p>
11+
</div>
12+
</div>
13+
)
14+
}
15+
16+
export default NotFound

0 commit comments

Comments
 (0)