fixed missing redirect on reload

This commit is contained in:
knox
2023-11-02 13:53:11 +01:00
parent 5c7498a959
commit ffbba3e7b6
+1 -1
View File
@@ -47,7 +47,7 @@ const App = () => {
const ProtectedRoute = ({isAuthenticated}) => {
if (!isAuthenticated) {
return <Navigate to="/login" replace />;
return <Navigate to="/login" state={{from: window.location.pathname}} />;
}
return <Outlet/>;
}