From 991957238377771653b99bf24de19d0d18996a9b Mon Sep 17 00:00:00 2001 From: asmit27rai Date: Sat, 1 Jun 2024 12:16:54 +0530 Subject: [PATCH] frontend: Work On The Error Page This commit is for modified error pages that show if unknown route is accessed and then it give link to homepage by using link from react-router-dom and also remove display flex option from body Fixes: #21 --- backend/package-lock.json | 1 + frontend/src/index.css | 2 +- frontend/src/pages/Error.tsx | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index 8a7aa85..96cf9fc 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -7146,6 +7146,7 @@ "version": "5.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/frontend/src/index.css b/frontend/src/index.css index 947e619..6474d5c 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -28,7 +28,7 @@ a:hover { body { margin: 0; - display: flex; + /* display: flex; */ place-items: center; min-width: 320px; min-height: 100vh; diff --git a/frontend/src/pages/Error.tsx b/frontend/src/pages/Error.tsx index 7a93fd7..350b21c 100644 --- a/frontend/src/pages/Error.tsx +++ b/frontend/src/pages/Error.tsx @@ -2,9 +2,21 @@ import { Link } from 'react-router-dom'; function Error() { return ( -
- This page does not exist! - Go back to homepage +
+
+

+ 404 +

+

+ This page does not exist! +

+ + Go Back To Homepage + +
); }