From e1a0b1abbd124c00fa4e98e8dd9c98c0342d784e Mon Sep 17 00:00:00 2001 From: harshbhar0629 Date: Wed, 9 Oct 2024 00:56:55 +0530 Subject: [PATCH] Now entering the wrong path in website it will not show its own page now it will my error page --- frontend/src/App.js | 4 +++ frontend/src/pages/Error/index.js | 47 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 frontend/src/pages/Error/index.js diff --git a/frontend/src/App.js b/frontend/src/App.js index d044023..6596586 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -20,6 +20,7 @@ import About from "./pages/About/About.js"; import Loan from "./pages/Loan/Loan.js"; import Dashboard from "./pages/Dashboard/Dashboard.js"; import Contact from "./pages/Contact/Contact.js"; +import Error from "./pages/Error/index.js"; function App() { const location = useLocation(); return ( @@ -40,6 +41,9 @@ function App() { } /> } /> {/* Use lowercase for consistency */} } /> + }> {location.pathname !== "/login" && location.pathname.toLowerCase() !== "/signup" &&