Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
b4s36t4 committed Sep 14, 2023
1 parent 4392170 commit 07e0a5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ function ReportScreen({
ComposerActions.setShouldShowComposeInput(true);
}, [route, report, errors, fetchReportIfNeeded, prevReport.reportID]);

const isReportAvailable = useMemo(
// eslint-disable-next-line rulesdir/no-negated-variables
const shouldShowNotFoundPage = useMemo(
() => (!_.isEmpty(report) && !isDefaultReport && !report.reportID && !isOptimisticDelete && !report.isLoadingReportActions && !isLoading) || shouldHideReport,
[report, isLoading, shouldHideReport, isDefaultReport, isOptimisticDelete],
);
Expand All @@ -320,7 +321,7 @@ function ReportScreen({
shouldDisableFocusTrap
>
<FullPageNotFoundView
shouldShow={isReportAvailable}
shouldShow={shouldShowNotFoundPage}
subtitleKey="notFound.noAccess"
shouldShowCloseButton={false}
shouldShowBackButton={isSmallScreenWidth}
Expand Down

0 comments on commit 07e0a5a

Please sign in to comment.