Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ishpaul777 committed Mar 27, 2024
1 parent b572a68 commit 540c5dd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/home/ReportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function ReportScreen({
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();
const reportIDFromRoute = route?.params?.reportID ?? '';
const reportIDFromRoute = getReportID(route);
const reportActionIDFromRoute = route?.params?.reportActionID ?? '';
const isFocused = useIsFocused();
const prevIsFocused = usePrevious(isFocused);
Expand Down Expand Up @@ -337,7 +337,6 @@ function ReportScreen({

const isLoading = !isSidebarLoaded || PersonalDetailsUtils.isPersonalDetailsEmpty();
const shouldShowSkeleton =
// (firstRenderRef.current && !!reportIDFromRoute && !ReportUtils.isValidReportIDFromPath(reportIDFromRoute)) ||
isLinkingToMessage ||
!isCurrentReportLoadedFromOnyx ||
(reportActions.length === 0 && !!reportMetadata?.isLoadingInitialReportActions) ||
Expand All @@ -347,10 +346,10 @@ function ReportScreen({
const shouldShowReportActionList = isCurrentReportLoadedFromOnyx && !isLoading;
// eslint-disable-next-line rulesdir/no-negated-variables
const shouldShowNotFoundPage =
!firstRenderRef.current &&
((!wasReportAccessibleRef.current && !report.reportID && !isOptimisticDelete && !reportMetadata?.isLoadingInitialReportActions && !userLeavingStatus) ||
shouldHideReport ||
(!!reportIDFromRoute && !ReportUtils.isValidReportIDFromPath(reportIDFromRoute)))
!firstRenderRef.current &&
((!wasReportAccessibleRef.current && !report.reportID && !isOptimisticDelete && !reportMetadata?.isLoadingInitialReportActions && !userLeavingStatus) ||
shouldHideReport ||
(!!reportIDFromRoute && !ReportUtils.isValidReportIDFromPath(reportIDFromRoute)));

const fetchReport = useCallback(() => {
Report.openReport(reportIDFromRoute, reportActionIDFromRoute);
Expand Down

0 comments on commit 540c5dd

Please sign in to comment.