Skip to content

Commit

Permalink
Merge pull request Expensify#56070 from callstack-internal/fix/56026-…
Browse files Browse the repository at this point in the history
…device-gestures-on-success-page

Proper back navigation handling in card deactivation success page
  • Loading branch information
mountiny authored Jan 31, 2025
2 parents ad3bddd + 0066ef8 commit 19cac4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import {clearCardListErrors, clearReportVirtualCardFraudForm, reportVirtualExpensifyCardFraud} from '@userActions/Card';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import SCREENS from '@src/SCREENS';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

type ReportVirtualCardFraudPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.WALLET.REPORT_VIRTUAL_CARD_FRAUD>;
Expand Down Expand Up @@ -62,7 +62,8 @@ function ReportVirtualCardFraudPage({
}

if (latestIssuedVirtualCardID) {
Navigation.navigate(ROUTES.SETTINGS_REPORT_FRAUD_CONFIRMATION.getRoute(latestIssuedVirtualCardID));
Navigation.removeScreenFromNavigationState(SCREENS.SETTINGS.WALLET.DOMAIN_CARD);
Navigation.closeAndNavigate(ROUTES.SETTINGS_REPORT_FRAUD_CONFIRMATION.getRoute(latestIssuedVirtualCardID));
setIsValidateCodeActionModalVisible(false);
}
}, [formData?.isLoading, latestIssuedVirtualCardID, prevIsLoading, virtualCard?.errors]);
Expand Down

0 comments on commit 19cac4f

Please sign in to comment.