Skip to content

Commit

Permalink
fix: Blank page after returning to IOU report from thread and deletin…
Browse files Browse the repository at this point in the history
…g the other request
  • Loading branch information
tienifr committed Apr 12, 2024
1 parent fa2bfb2 commit 016df60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ function ReportScreen({
}

const transactionThreadReportID = useMemo(() => ReportActionsUtils.getOneTransactionThreadReportID(report.reportID, reportActions ?? []), [report.reportID, reportActions]);

useEffect(() => {

Check failure on line 337 in src/pages/home/ReportScreen.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Prefer an early return to a conditionally-wrapped function body
if (transactionThreadReportID && route.params.reportActionID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(route.params.reportID));
}
}, [transactionThreadReportID]);

Check warning on line 341 in src/pages/home/ReportScreen.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

React Hook useEffect has missing dependencies: 'route.params.reportActionID' and 'route.params.reportID'. Either include them or remove the dependency array

if (ReportUtils.isMoneyRequestReport(report)) {
headerView = (
<MoneyReportHeader
Expand Down

0 comments on commit 016df60

Please sign in to comment.