Skip to content

Commit

Permalink
Merge pull request #57252 from software-mansion-labs/fix/navigation-b…
Browse files Browse the repository at this point in the history
…ack-to-verify

[CP Staging] Fix that Swiping back on success page redirects back to verify

(cherry picked from commit 4143aea)

(CP triggered by francoisl)
  • Loading branch information
mountiny authored and OSBotify committed Feb 21, 2025
1 parent cd81e12 commit 3a08b9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/settings/Security/TwoFactorAuth/DisablePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function DisablePage() {
return;
}

Navigation.navigate(ROUTES.SETTINGS_2FA_DISABLED);
Navigation.navigate(ROUTES.SETTINGS_2FA_DISABLED, {forceReplace: true});
}, [account?.requiresTwoFactorAuth]);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Security/TwoFactorAuth/VerifyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function VerifyPage({route}: VerifyPageProps) {
if (!account?.requiresTwoFactorAuth || !account.codesAreCopied) {
return;
}
Navigation.navigate(ROUTES.SETTINGS_2FA_SUCCESS.getRoute(route.params?.backTo, route.params?.forwardTo));
Navigation.navigate(ROUTES.SETTINGS_2FA_SUCCESS.getRoute(route.params?.backTo, route.params?.forwardTo), {forceReplace: true});
}, [account?.codesAreCopied, account?.requiresTwoFactorAuth, route.params?.backTo, route.params?.forwardTo]);

/**
Expand Down

0 comments on commit 3a08b9f

Please sign in to comment.