mirror of
https://github.com/ansible/awx.git
synced 2026-04-11 04:59:22 -02:30
Fix bad merge conflict resolution
This commit is contained in:
@@ -103,7 +103,11 @@ const ProtectedRoute = ({ children, ...rest }) => {
|
|||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setAuthRedirectTo(authRedirectTo === '/logout' ? '/' : pathname);
|
setAuthRedirectTo(
|
||||||
|
authRedirectTo === '/logout'
|
||||||
|
? '/'
|
||||||
|
: `${location.pathname}${location.search}`
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isAuthenticated(document.cookie)) {
|
if (isAuthenticated(document.cookie)) {
|
||||||
@@ -116,12 +120,6 @@ const ProtectedRoute = ({ children, ...rest }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setAuthRedirectTo(
|
|
||||||
authRedirectTo === '/logout'
|
|
||||||
? '/'
|
|
||||||
: `${location.pathname}${location.search}`
|
|
||||||
);
|
|
||||||
|
|
||||||
return <Redirect to="/login" />;
|
return <Redirect to="/login" />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user