diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index 34d4070dbe9..61c0b939695 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -114,8 +114,12 @@ export const handleSignOut = (forceReload: boolean) => { const redirectURL = new URLSearchParams(window.location.search).get( "redirect" ); - redirectURL ? navigate(`/?redirect=${redirectURL}`) : navigate("/"); - if (forceReload) window.location.href = "/"; + const url = redirectURL ? `/?redirect=${redirectURL}` : "/"; + if (forceReload) { + window.location.href = url; + } else { + navigate(url); + } }; export const handleRedirection = () => {