Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Jul 13, 2024
1 parent 089c0fa commit 90fe533
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,14 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
onCancel={() => setIsDeleteModalVisible(false)}
onModalHide={() => {
// We use isTransactionDeleted to know if the modal hides because the user deletes the transaction.
if (isTransactionDeleted.current) {
if (!navigateBackToAfterDelete.current) {
Navigation.dismissModal();
} else {
ReportUtils.navigateBackAfterDeleteTransaction(navigateBackToAfterDelete.current);
}
if (!isTransactionDeleted.current) {
return;
}

if (!navigateBackToAfterDelete.current) {
Navigation.dismissModal();
} else {
ReportUtils.navigateBackAfterDeleteTransaction(navigateBackToAfterDelete.current);
}
}}
prompt={caseID === CASES.DEFAULT ? translate('task.deleteConfirmation') : translate('iou.deleteConfirmation')}
Expand Down

0 comments on commit 90fe533

Please sign in to comment.