Skip to content

Commit

Permalink
chore: update code based on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
suisin-deriv committed Nov 15, 2024
1 parent c9d3694 commit ea12d1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ const AccountSwitcher = observer(({ history, is_mobile, is_visible }) => {
};

const logoutHandler = async () => {
await setIsForcedToExitPnv(true);
// for DBot we need to logout first and only after this redirect to TH
if (window.location.pathname.startsWith(routes.bot)) {
await logoutClient();
history.push(routes.traders_hub);
} else {
if (window.location.pathname.startsWith(routes.phone_verification)) {
await setIsForcedToExitPnv(true);
}
history.push(routes.traders_hub);
await logoutClient();
}
Expand Down

0 comments on commit ea12d1a

Please sign in to comment.