Skip to content

Commit

Permalink
[UPM1539] Suisin/fix: user coming from personal detail when verified …
Browse files Browse the repository at this point in the history
…not route to TH (#17101)

* fix: user coming from personal detail when verified not route to TH

* chore: fix routing issue when coming from personal details page
  • Loading branch information
suisin-deriv authored Oct 16, 2024
1 parent 6db4e91 commit c6e965d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const VerifyButton = observer(

const redirectToPhoneVerification = (e: React.MouseEvent<HTMLElement>) => {
e.preventDefault();
localStorage.setItem('routes_from_notification_to_pnv', routes.personal_details);
setVerificationCode('', 'phone_number_verification');
setShouldShowPhoneNumberOTP(false);
const request = makeSettingsRequest({ ...values }, residence_list, states_list, is_virtual);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const PhoneNumberVerifiedModal = observer(({ should_show_phone_number_verified_m
const history = useHistory();
const previous_route = localStorage.getItem('routes_from_notification_to_pnv');
const should_route_back_to_previous =
!!previous_route &&
(previous_route !== routes.personal_details || previous_route !== routes.phone_verification);
previous_route !== routes.personal_details && previous_route !== routes.phone_verification && !!previous_route;

const handleDoneButton = () => {
localStorage.removeItem('routes_from_notification_to_pnv');
Expand Down

0 comments on commit c6e965d

Please sign in to comment.