refactor: use proper config for routes

This commit is contained in:
Your Name
2026-04-11 19:51:00 +05:30
parent 9953b27385
commit 73a9787daf
3 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ export function ProtectedRoute({ children }: { children: React.ReactNode }) {
if (!isAuthenticated) {
// Save the intended location to redirect back after login
return <Navigate to="/login" state={{ from: location }} replace />;
return <Navigate to={ROUTES.LOGIN} state={{ from: location }} replace />;
}
return <>{children}</>;