Skip to content

Commit

Permalink
Merge pull request #48841 from Expensify/beaman-fixTypecheckOnMain
Browse files Browse the repository at this point in the history
Use proper hook on NotFoundPage & fix typecheck
  • Loading branch information
Beamanator authored Sep 9, 2024
2 parents 4d250ac + 97deab2 commit 063cc10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/ErrorPage/NotFoundPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import type {FullPageNotFoundViewProps} from '@components/BlockingViews/FullPageNotFoundView';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import ScreenWrapper from '@components/ScreenWrapper';
import useWindowDimensions from '@hooks/useWindowDimensions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';

Expand All @@ -13,14 +13,14 @@ type NotFoundPageProps = {

// eslint-disable-next-line rulesdir/no-negated-variables
function NotFoundPage({onBackButtonPress = () => Navigation.goBack(), isReportRelatedPage, ...fullPageNotFoundViewProps}: NotFoundPageProps) {
const {isSmallScreen} = useWindowDimensions();
const {isSmallScreenWidth} = useResponsiveLayout();

return (
<ScreenWrapper testID={NotFoundPage.displayName}>
<FullPageNotFoundView
shouldShow
onBackButtonPress={() => {
if (!isReportRelatedPage || !isSmallScreen) {
if (!isReportRelatedPage || !isSmallScreenWidth) {
onBackButtonPress();
return;
}
Expand Down

0 comments on commit 063cc10

Please sign in to comment.