Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function MoneyRequestReportTransactionsNavigation({currentReportID}: MoneyReques
return {prevReportID: prevID, nextReportID: nextID};
}, [currentReportID, reportIDsList]);

const backTo = Navigation.getActiveRoute();

/**
* We clear the sibling transactionThreadIDs when unmounting this component
* only when the mount actually goes to a different SCREEN (and not a different version of the same SCREEN)
Expand All @@ -57,10 +55,12 @@ function MoneyRequestReportTransactionsNavigation({currentReportID}: MoneyReques
isPrevButtonDisabled={!prevReportID}
isNextButtonDisabled={!nextReportID}
onNext={(e) => {
const backTo = Navigation.getActiveRoute();
e?.preventDefault();
Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID: nextReportID, backTo}), {forceReplace: true});
}}
onPrevious={(e) => {
const backTo = Navigation.getActiveRoute();
e?.preventDefault();
Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID: prevReportID, backTo}), {forceReplace: true});
}}
Expand Down