Skip to content

Commit

Permalink
use fullPageNotFoundPage
Browse files Browse the repository at this point in the history
  • Loading branch information
waterim committed Mar 20, 2024
1 parent 1a61fe2 commit 514bc3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/pages/ErrorPage/NotFoundPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import ScreenWrapper from '@components/ScreenWrapper';

type NotFoundPageProps = {
onBackButtonPress?: () => void;
shouldForceFullScreen?: boolean;
};

// eslint-disable-next-line rulesdir/no-negated-variables
function NotFoundPage({onBackButtonPress, shouldForceFullScreen = false}: NotFoundPageProps) {
function NotFoundPage({onBackButtonPress}: NotFoundPageProps) {
return (
<ScreenWrapper testID={NotFoundPage.displayName}>
<FullPageNotFoundView
shouldShow
shouldForceFullScreen={shouldForceFullScreen}
onBackButtonPress={onBackButtonPress}
/>
</ScreenWrapper>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/workspace/FeatureEnabledAccessOrNotFoundWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import React, {useEffect} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import Navigation from '@libs/Navigation/Navigation';
import * as PolicyUtils from '@libs/PolicyUtils';
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import * as Policy from '@userActions/Policy';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -53,7 +53,8 @@ function FeatureEnabledAccessOrNotFoundComponent(props: FeatureEnabledAccessOrNo

if (shouldShowNotFoundPage) {
return (
<NotFoundPage
<FullPageNotFoundView
shouldShow={shouldShowNotFoundPage}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
shouldForceFullScreen
/>
Expand Down

0 comments on commit 514bc3b

Please sign in to comment.