From c0d10948b70b1be77b477bc71a74384615492a16 Mon Sep 17 00:00:00 2001 From: Mustapha-Nkhili Date: Tue, 23 Jul 2024 11:47:03 +0000 Subject: [PATCH] Add NotFound page --- src/App.jsx | 5 +++++ src/pages/NotFound.jsx | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/pages/NotFound.jsx diff --git a/src/App.jsx b/src/App.jsx index 56ae444..9f7f9ef 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -118,6 +118,7 @@ import Resize from "./pages/docs/Interactivity/Resize"; import ScrollBehavior from "./pages/docs/Interactivity/ScrollBehavior"; import UserSelect from "./pages/docs/Interactivity/UserSelect"; import WillChange from "./pages/docs/Interactivity/WillChange"; +import NotFound from "./pages/NotFound"; import "./app.css"; @@ -603,6 +604,10 @@ function App() { }, ], }, + { + path: "*", + element: , + }, ]); return ; } diff --git a/src/pages/NotFound.jsx b/src/pages/NotFound.jsx new file mode 100644 index 0000000..fd7a5f6 --- /dev/null +++ b/src/pages/NotFound.jsx @@ -0,0 +1,23 @@ +import { useEffect } from "react"; +import { Link } from "react-router-dom"; + +const NotFound = () => { + useEffect(() => { + document.getElementsByTagName("title")[0].innerText = "404 - Nkhili CSS"; + }, []); + + return ( +
+

404

+ page not found + + go home + +
+ ); +}; + +export default NotFound;