Skip to content

Commit

Permalink
adding 404 page (NotFound) and style root to
Browse files Browse the repository at this point in the history
  • Loading branch information
No0ne003 committed Mar 4, 2024
1 parent 32c3657 commit c523c2c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import { ThemeProvider } from "@/components/theme-provider"
import { Route, Routes } from "react-router-dom"
import Home from "@/pages/Home"
// Layouts
import Header from "@/layouts/header"
// Pages
import Home from "@/pages/Home"
import NotFound from '@/pages/404'

function App() {

return(
<ThemeProvider defaultTheme="system" storageKey="ui-theme">
<Header />
<Routes>
<Route path="React-Project/" element={<Home />} />
<Route path='React-Project'>
<Route index element={<Home />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
</ThemeProvider>
)
Expand Down
3 changes: 3 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
body {
@apply bg-background text-foreground;
}
#root {
@apply h-screen w-screen flex flex-col
}
}
@layer components {
.focusing {
Expand Down
16 changes: 16 additions & 0 deletions src/pages/404.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

function NotFound() {

return (
<div className="flex items-center justify-center flex-1 space-x-4">
<div className="text-4xl font-bold border-r-2 border-primary pr-4 font-mono">
404
</div>
<div className="text-lg">
Not Found
</div>
</div>
)
}

export default NotFound;

0 comments on commit c523c2c

Please sign in to comment.