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