From 080e79fb3f2e3987e0f37a2c14086b224834d9a2 Mon Sep 17 00:00:00 2001 From: sumo_slonik Date: Mon, 26 Jan 2026 13:26:13 +0100 Subject: [PATCH] fix infinite loading --- src/pages/home/ReportScreen.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/home/ReportScreen.tsx b/src/pages/home/ReportScreen.tsx index f12edd4f1032..15b73e4ab93f 100644 --- a/src/pages/home/ReportScreen.tsx +++ b/src/pages/home/ReportScreen.tsx @@ -523,14 +523,18 @@ function ReportScreen({route, navigation, isInSidePanel = false}: ReportScreenPr // eslint-disable-next-line rulesdir/no-negated-variables const shouldShowNotFoundPage = useMemo((): boolean => { - const isLoading = isLoadingApp !== false || !!isLoadingReportData || !!reportMetadata?.isLoadingInitialReportActions; - const reportExists = !!reportID || !!isOptimisticDelete || !!userLeavingStatus; const isInvalidReportPath = !!currentReportIDFormRoute && !isValidReportIDFromPath(currentReportIDFormRoute); + const isLoading = isLoadingApp !== false || isLoadingReportData || !!reportMetadata?.isLoadingInitialReportActions; + const reportExists = !!reportID || isOptimisticDelete || userLeavingStatus; if (shouldShowNotFoundLinkedAction) { return true; } + if (isInvalidReportPath) { + return true; + } + if (isLoading) { return false; } @@ -539,11 +543,7 @@ function ReportScreen({route, navigation, isInSidePanel = false}: ReportScreenPr return false; } - if (!reportExists) { - return true; - } - - return isInvalidReportPath; + return !reportExists; }, [ shouldShowNotFoundLinkedAction, isLoadingApp,