From 05e8d0728570a1447cdbc8ad7277b0e067cd517c Mon Sep 17 00:00:00 2001 From: Dinesh Kumar Sutihar Date: Mon, 24 Mar 2025 05:23:32 +0530 Subject: [PATCH] feat: adds 404 not found page --- frontend/src/components/NotFound.jsx | 178 +++++++++++++++++++++++++++ frontend/src/main.jsx | 2 + 2 files changed, 180 insertions(+) create mode 100644 frontend/src/components/NotFound.jsx diff --git a/frontend/src/components/NotFound.jsx b/frontend/src/components/NotFound.jsx new file mode 100644 index 00000000..2b737748 --- /dev/null +++ b/frontend/src/components/NotFound.jsx @@ -0,0 +1,178 @@ +import { Link } from "react-router-dom"; +import { ArrowBack, ErrorOutline } from "@mui/icons-material"; +import { Button, Container, Typography, Box, Paper } from "@mui/material"; + +export default function NotFound() { + return ( + + + + + + + + + + + 404 + + + Page not found + + + The page you're looking for doesn't exist or has been moved. + + + + + + + + + + Error Code: 404_PAGE_NOT_FOUND + + + Timestamp: {new Date().toISOString()} + + + Path:{" "} + {typeof window !== "undefined" + ? window.location.pathname + : "/unknown"} + + + + + + + + © {new Date().getFullYear()} Log Analyzer. All rights reserved. + + + + + + + + + + ); +} diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx index a6156fea..0e01df2f 100644 --- a/frontend/src/main.jsx +++ b/frontend/src/main.jsx @@ -4,6 +4,7 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { StyledEngineProvider } from "@mui/material/styles"; import App from "./App.jsx"; import "./index.css"; +import NotFound from "./components/NotFound.jsx"; function Dashboard() { return

Dashboard

; @@ -16,6 +17,7 @@ createRoot(document.getElementById("root")).render( } /> } /> + } />