From c206f033138cb35bba0da184574ff711c34be153 Mon Sep 17 00:00:00 2001 From: Project_IO Date: Tue, 18 Mar 2025 02:32:28 +0900 Subject: [PATCH] feat: not found handle page --- src/App.tsx | 13 ++----------- src/components/notfound/index.tsx | 18 ++++++++++++++++++ src/components/notfound/notfound.scss | 14 ++++++++++++++ 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 src/components/notfound/index.tsx create mode 100644 src/components/notfound/notfound.scss diff --git a/src/App.tsx b/src/App.tsx index ccc9efe..9fe5db5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import { BrowserRouter, Route, Routes, useLocation } from "react-router"; import "./App.scss"; import kuma from "./assets/kuma.png"; +import NotFound from "./components/notfound"; function App() { return ( @@ -41,17 +42,7 @@ function Dashboard() { return (
- {typeof path.data !== "undefined" ? path.data.is_dir ? : : ( - <> -

404 Not Found

- - - - )} - + {typeof path.data !== "undefined" ? path.data.is_dir ? : : }
); diff --git a/src/components/notfound/index.tsx b/src/components/notfound/index.tsx new file mode 100644 index 0000000..d67df30 --- /dev/null +++ b/src/components/notfound/index.tsx @@ -0,0 +1,18 @@ +import { DynamicIcon } from "lucide-react/dynamic"; +import "./notfound.scss"; + +function NotFound() { + return ( +
+ +

404 Not Found

+ + +
+ ); +} + +export default NotFound; diff --git a/src/components/notfound/notfound.scss b/src/components/notfound/notfound.scss new file mode 100644 index 0000000..3f2e179 --- /dev/null +++ b/src/components/notfound/notfound.scss @@ -0,0 +1,14 @@ +.not-found { + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + + .icon { + margin: 3rem 0; + } + + .primary { + margin: 0.5rem 0; + } +}