mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 15:56:56 +00:00
refactor: use proper config for routes
This commit is contained in:
@@ -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}</>;
|
||||
|
||||
Reference in New Issue
Block a user