Skip to content

Commit

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

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

// eslint-disable-next-line rulesdir/no-negated-variables
function NotFoundPage({onBackButtonPress}: NotFoundPageProps) {
function NotFoundPage({onBackButtonPress, shouldForceFullScreen = false}: NotFoundPageProps) {
return (
<ScreenWrapper testID={NotFoundPage.displayName}>
<FullPageNotFoundView
shouldShow
shouldForceFullScreen={shouldForceFullScreen}
onBackButtonPress={onBackButtonPress}
/>
</ScreenWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ function FeatureEnabledAccessOrNotFoundComponent(props: FeatureEnabledAccessOrNo
}

if (shouldShowNotFoundPage) {
return <NotFoundPage onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)} />;
return (
<NotFoundPage
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
shouldForceFullScreen
/>
);
}

return typeof props.children === 'function' ? props.children(props) : props.children;
Expand Down

0 comments on commit 1a61fe2

Please sign in to comment.