From 11bb69726a5f84153894f214edeb1074d88ecf7f Mon Sep 17 00:00:00 2001 From: Prem Kolte Date: Sat, 5 Oct 2024 19:33:53 +0530 Subject: [PATCH] routes update --- frontend/src/App.jsx | 10 +++++----- frontend/src/Pages/Herosection.jsx | 2 +- frontend/src/Pages/LoginPage.jsx | 2 +- frontend/src/Pages/Register.jsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index fbe0ef5..c93b685 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -14,8 +14,8 @@ function App() { } /> - } /> - } /> + } /> + } /> {/* This route is just for testing protected routes it can be removed later when there is a route other than login or signup */} }> @@ -55,15 +55,15 @@ export function ProtectedRoute() { console.log('Token Verification error:', data.error); // For debugging if (data.error || res.status === 400 || res.status === 500) { - navigate('/login'); + navigate('/Login'); } if (res.status === 400 || res.status === 500) { - navigate('/login'); + navigate('/Login'); } } catch (error) { console.error('Error verifying token:', error); - navigate('/login'); + navigate('/Login'); } }; diff --git a/frontend/src/Pages/Herosection.jsx b/frontend/src/Pages/Herosection.jsx index c020ffd..7481375 100644 --- a/frontend/src/Pages/Herosection.jsx +++ b/frontend/src/Pages/Herosection.jsx @@ -17,7 +17,7 @@ const Herosection = () => { const navigate = useNavigate(); const LoginClick = () => { - navigate('/login'); // Navigates to the login page + navigate('/Login'); // Navigates to the login page }; const RegisterClick = () => { navigate('/Register'); // Navigates to the login page diff --git a/frontend/src/Pages/LoginPage.jsx b/frontend/src/Pages/LoginPage.jsx index 510da79..ee075c4 100644 --- a/frontend/src/Pages/LoginPage.jsx +++ b/frontend/src/Pages/LoginPage.jsx @@ -68,7 +68,7 @@ const Login = () => { {/* Don't have an account link */}

Don't have an account?{' '} - + Register

diff --git a/frontend/src/Pages/Register.jsx b/frontend/src/Pages/Register.jsx index 32b46d9..5ca37ab 100644 --- a/frontend/src/Pages/Register.jsx +++ b/frontend/src/Pages/Register.jsx @@ -96,7 +96,7 @@ const Register = () => { {/* Already have an account link */}

Already have an account?{' '} - + Log in