From 2f994661c940918229d7534708213bc55cdfae84 Mon Sep 17 00:00:00 2001 From: Youssef Lourayad Date: Sat, 13 Apr 2024 00:42:25 +0000 Subject: [PATCH] Merge pull request #40157 from tienifr/fix/40087 fix: Blank page after returning to IOU report from thread and deleting the other request (cherry picked from commit db9e01cc302df7f2b3dd53a99c1082404676aedb) --- src/pages/home/ReportScreen.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index b93daf4f097b..68f984d31414 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -333,6 +333,14 @@ function ReportScreen({ } const transactionThreadReportID = useMemo(() => ReportActionsUtils.getOneTransactionThreadReportID(report.reportID, reportActions ?? []), [report.reportID, reportActions]); + + useEffect(() => { + if (!transactionThreadReportID || !route.params.reportActionID) { + return; + } + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(route.params.reportID)); + }, [transactionThreadReportID, route.params.reportActionID, route.params.reportID]); + if (ReportUtils.isMoneyRequestReport(report)) { headerView = (