From c0f44a853ae8bd4d8506a3993348acb6f8585ab3 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Fri, 21 Jun 2024 16:31:52 -0400 Subject: [PATCH] remove clearReportNotFoundErrors --- src/libs/actions/Report.ts | 13 ------------- src/pages/home/ReportScreen.tsx | 10 ---------- 2 files changed, 23 deletions(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index bcfe3f30f8f4..e8332dd28289 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -2240,18 +2240,6 @@ function clearPolicyRoomNameErrors(reportID: string) { }); } -/** - * @param reportID The reportID of the report. - */ -// eslint-disable-next-line rulesdir/no-negated-variables -function clearReportNotFoundErrors(reportID: string) { - Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, { - errorFields: { - notFound: null, - }, - }); -} - function setIsComposerFullSize(reportID: string, isComposerFullSize: boolean) { Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${reportID}`, isComposerFullSize); } @@ -3766,7 +3754,6 @@ export { toggleSubscribeToChildReport, updatePolicyRoomNameAndNavigate, clearPolicyRoomNameErrors, - clearReportNotFoundErrors, clearIOUError, subscribeToNewActionEvent, notifyNewAction, diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index 37b9184a3250..5fbb00e8ebdf 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -400,16 +400,6 @@ function ReportScreen({ Report.openReport(reportIDFromRoute, reportActionIDFromRoute); }, [reportIDFromRoute, reportActionIDFromRoute]); - useEffect(() => { - if (!report.reportID) { - return; - } - - if (report?.errorFields?.notFound) { - Report.clearReportNotFoundErrors(report.reportID); - } - }, [report?.errorFields?.notFound, report.reportID]); - useEffect(() => { if (!report.reportID || !isFocused) { return;