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

(cherry picked from commit 7cb6bd3)

(CP triggered by mountiny)
  • Loading branch information
mountiny authored and OSBotify committed Sep 3, 2024
1 parent 7715e2b commit a124e4f
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 a124e4f

Please sign in to comment.