diff --git a/src/components/BlockingViews/ForceFullScreenView/index.native.tsx b/src/components/BlockingViews/ForceFullScreenView/index.native.tsx
new file mode 100644
index 000000000000..296e7c26a9bc
--- /dev/null
+++ b/src/components/BlockingViews/ForceFullScreenView/index.native.tsx
@@ -0,0 +1,9 @@
+import type ForceFullScreenViewProps from './types';
+
+function ForceFullScreenView({children}: ForceFullScreenViewProps) {
+ return children;
+}
+
+ForceFullScreenView.displayName = 'ForceFullScreenView';
+
+export default ForceFullScreenView;
diff --git a/src/components/BlockingViews/ForceFullScreenView/index.tsx b/src/components/BlockingViews/ForceFullScreenView/index.tsx
new file mode 100644
index 000000000000..211403fd9ca1
--- /dev/null
+++ b/src/components/BlockingViews/ForceFullScreenView/index.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import {View} from 'react-native';
+import useThemeStyles from '@hooks/useThemeStyles';
+import type ForceFullScreenViewProps from './types';
+
+function ForceFullScreenView({children, forceFullPage = false}: ForceFullScreenViewProps) {
+ const styles = useThemeStyles();
+
+ if (forceFullPage) {
+ return {children};
+ }
+
+ return children;
+}
+
+ForceFullScreenView.displayName = 'ForceFullScreenViewProps';
+
+export default ForceFullScreenView;
diff --git a/src/components/BlockingViews/ForceFullScreenView/types.ts b/src/components/BlockingViews/ForceFullScreenView/types.ts
new file mode 100644
index 000000000000..3cdcb214cc76
--- /dev/null
+++ b/src/components/BlockingViews/ForceFullScreenView/types.ts
@@ -0,0 +1,7 @@
+import type ChildrenProps from '@src/types/utils/ChildrenProps';
+
+type ForceFullScreenViewProps = ChildrenProps & {
+ forceFullPage?: boolean;
+};
+
+export default ForceFullScreenViewProps;
diff --git a/src/components/BlockingViews/FullPageNotFoundView.tsx b/src/components/BlockingViews/FullPageNotFoundView.tsx
index 5993e60861f5..a5d313a0e14b 100644
--- a/src/components/BlockingViews/FullPageNotFoundView.tsx
+++ b/src/components/BlockingViews/FullPageNotFoundView.tsx
@@ -9,6 +9,7 @@ import variables from '@styles/variables';
import type {TranslationPaths} from '@src/languages/types';
import ROUTES from '@src/ROUTES';
import BlockingView from './BlockingView';
+import ForceFullScreenView from './ForceFullScreenView';
type FullPageNotFoundViewProps = {
/** Child elements */
@@ -37,6 +38,9 @@ type FullPageNotFoundViewProps = {
/** Function to call when pressing the navigation link */
onLinkPress: () => void;
+
+ /** Whether we should force the full page view */
+ forceFullPage?: boolean;
};
// eslint-disable-next-line rulesdir/no-negated-variables
@@ -50,13 +54,14 @@ function FullPageNotFoundView({
shouldShowLink = true,
shouldShowBackButton = true,
onLinkPress = () => Navigation.dismissModal(),
+ forceFullPage = false,
}: FullPageNotFoundViewProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
if (shouldShow) {
return (
- <>
+
- >
+
);
}
diff --git a/src/pages/workspace/WorkspacePageWithSections.js b/src/pages/workspace/WorkspacePageWithSections.js
index f2154f77c9e5..b8a9443ef2de 100644
--- a/src/pages/workspace/WorkspacePageWithSections.js
+++ b/src/pages/workspace/WorkspacePageWithSections.js
@@ -119,6 +119,8 @@ function WorkspacePageWithSections({
const {isSmallScreenWidth} = useWindowDimensions();
const firstRender = useRef(true);
+ const goBack = () => Navigation.goBack(ROUTES.SETTINGS_WORKSPACES);
+
useEffect(() => {
// Because isLoading is false before merging in Onyx, we need firstRender ref to display loading page as well before isLoading is change to true
firstRender.current = false;
@@ -137,9 +139,11 @@ function WorkspacePageWithSections({
shouldShowOfflineIndicatorInWideScreen={shouldShowOfflineIndicatorInWideScreen}
>
Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)}
+ onBackButtonPress={goBack}
+ onLinkPress={goBack}
shouldShow={_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy) || PolicyUtils.isPendingDeletePolicy(policy)}
subtitleKey={_.isEmpty(policy) ? undefined : 'workspace.common.notAuthorized'}
+ forceFullPage
>
paddingBottom: variables.contentHeaderHeight,
},
+ forcedBlockingViewContainer: {
+ ...positioning.pFixed,
+ top: 0,
+ left: 0,
+ right: 0,
+ bottom: 0,
+ backgroundColor: theme.appBG,
+ },
+
defaultModalContainer: {
backgroundColor: theme.componentBG,
borderColor: theme.transparent,