Skip to content

Commit

Permalink
Merge pull request #48466 from getusha/validate-contact-method-action…
Browse files Browse the repository at this point in the history
…-followups

[CP Staging] Fix: navigate after clearing contact method
  • Loading branch information
mountiny authored Sep 3, 2024
2 parents 11952cc + 056986b commit 7cb6bd3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ function deleteContactMethod(contactMethod: string, loginList: Record<string, Lo
/**
* Clears a contact method optimistically. this is used when the contact method fails to be added to the backend
*/

function clearContactMethod(contactMethod: string) {
Onyx.merge(ONYXKEYS.LOGIN_LIST, {
[contactMethod]: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
<ErrorMessageRow
errors={ErrorUtils.getLatestErrorField(loginData, 'addedLogin')}
errorRowStyles={[themeStyles.mh5, themeStyles.mv3]}
onClose={() => User.clearContactMethod(contactMethod)}
onClose={() => {
User.clearContactMethod(contactMethod);
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo));
}}
canDismissError
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function ValidateContactActionPage() {
includeSafeAreaPaddingBottom={false}
shouldEnableMaxHeight
testID={ValidateContactActionPage.displayName}
offlineIndicatorStyle={themeStyles.mtAuto}
>
<HeaderWithBackButton
title={account?.primaryLogin ?? ''}
Expand Down

0 comments on commit 7cb6bd3

Please sign in to comment.