Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ToastViewport from "./components/toasts/ToastViewport";
import Navbar from "./components/Navbar";
import GameplayNavbar from "./components/GameplayNavbar";
import { routeConfig } from "./config/routes";
import NotFound from "./pages/NotFound";

const Home = () => (
<>
Expand Down Expand Up @@ -42,22 +43,18 @@ function App() {
<Suspense fallback={<div>Loading...</div>}>
<Routes>
<Route path="/" element={<Home />} />
{routeConfig
{routeConfig
.filter((route) => route.isLazy && route.component)
.map((route) => (
<Route
key={route.path}
path={route.path}
element={<route.component />}
/>
))}
))}
<Route
path="*"
element={
<div className="h-screen flex items-center justify-center text-white text-2xl">
404 β€” Page Not Found
</div>
}
element={<NotFound />}
/>
</Routes>
</Suspense>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Link } from "react-router-dom";
export default function NotFound() {
return (
<div className="h-screen flex flex-col items-center justify-center gap-4 text-white">
<h1 className="text-6xl font-bold">404</h1>
<h1 className="text-8xl font-bold text-[#CFFDED]">404</h1>
<p className="text-xl text-gray-400">Page not found</p>
<Link
to="/"
className="mt-4 px-6 py-2 bg-white text-black rounded-full font-medium hover:bg-gray-200 transition"
className="mt-4 px-6 py-2 bg-[#CFFDED] text-black rounded-full font-medium hover:bg-gray-200 transition"
>
Go Home
</Link>
Expand Down