From 97deab2c0e822ed6efb41553436a21c50b9e3a12 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Mon, 9 Sep 2024 15:40:45 -0600 Subject: [PATCH] Use proper hook --- src/pages/ErrorPage/NotFoundPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/ErrorPage/NotFoundPage.tsx b/src/pages/ErrorPage/NotFoundPage.tsx index 166358cf9bda..6a63a7204215 100644 --- a/src/pages/ErrorPage/NotFoundPage.tsx +++ b/src/pages/ErrorPage/NotFoundPage.tsx @@ -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'; @@ -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 ( { - if (!isReportRelatedPage || !isSmallScreen) { + if (!isReportRelatedPage || !isSmallScreenWidth) { onBackButtonPress(); return; }