mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Fix bad merge conflict resolution
This commit is contained in:
@@ -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" />;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user