From e5578a8ef3bb64021f9d48b5cf995cebdd354353 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 29 Sep 2021 13:55:30 -0400 Subject: [PATCH] Fix bad merge conflict resolution --- awx/ui/src/App.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/awx/ui/src/App.js b/awx/ui/src/App.js index a1e1dc1dc9..ab0211bd38 100644 --- a/awx/ui/src/App.js +++ b/awx/ui/src/App.js @@ -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 ; };