diff --git a/src/pages/iou/request/step/IOURequestStepDestination.tsx b/src/pages/iou/request/step/IOURequestStepDestination.tsx
index 4e7139942570..d43b2adfb6ef 100644
--- a/src/pages/iou/request/step/IOURequestStepDestination.tsx
+++ b/src/pages/iou/request/step/IOURequestStepDestination.tsx
@@ -6,7 +6,6 @@ import Button from '@components/Button';
import DestinationPicker from '@components/DestinationPicker';
import FixedFooter from '@components/FixedFooter';
import * as Illustrations from '@components/Icon/Illustrations';
-import ScreenWrapper from '@components/ScreenWrapper';
import type {ListItem} from '@components/SelectionListWithSections/types';
import WorkspaceEmptyStateSection from '@components/WorkspaceEmptyStateSection';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
@@ -144,62 +143,58 @@ function IOURequestStepDestination({
const keyboardVerticalOffset = openedFromStartPage ? variables.contentHeaderHeight + top + variables.tabSelectorButtonHeight + variables.tabSelectorButtonPadding : 0;
return (
-
-
- {isLoading && (
-
+ )}
+ {shouldShowOfflineView && {null}}
+ {shouldShowEmptyState && (
+
+
- )}
- {shouldShowOfflineView && {null}}
- {shouldShowEmptyState && (
-
-
- {isPolicyAdmin(policy) && !!policy?.areCategoriesEnabled && (
-
-
- )}
-
- )}
- {!shouldShowEmptyState && !isLoading && !shouldShowOfflineView && !!policy?.id && (
-
- )}
-
-
+ {isPolicyAdmin(policy) && !!policy?.areCategoriesEnabled && (
+
+
+ )}
+
+ )}
+ {!shouldShowEmptyState && !isLoading && !shouldShowOfflineView && !!policy?.id && (
+
+ )}
+
);
}
diff --git a/src/pages/iou/request/step/StepScreenWrapper.tsx b/src/pages/iou/request/step/StepScreenWrapper.tsx
index 7b4283e368fe..a5cbe423b689 100644
--- a/src/pages/iou/request/step/StepScreenWrapper.tsx
+++ b/src/pages/iou/request/step/StepScreenWrapper.tsx
@@ -39,6 +39,9 @@ type StepScreenWrapperProps = {
/** Flag to indicate if the keyboard avoiding view should be enabled */
shouldEnableKeyboardAvoidingView?: boolean;
+ keyboardVerticalOffset?: number;
+ includePaddingTop?: boolean;
+ shouldShowHeader?: boolean;
};
function StepScreenWrapper({
@@ -52,6 +55,9 @@ function StepScreenWrapper({
includeSafeAreaPaddingBottom,
shouldShowOfflineIndicator = true,
shouldEnableKeyboardAvoidingView = true,
+ includePaddingTop = true,
+ keyboardVerticalOffset = 0,
+ shouldShowHeader = true,
}: StepScreenWrapperProps) {
const styles = useThemeStyles();
@@ -67,14 +73,18 @@ function StepScreenWrapper({
shouldEnableMaxHeight={canUseTouchScreen()}
shouldShowOfflineIndicator={shouldShowOfflineIndicator}
shouldEnableKeyboardAvoidingView={shouldEnableKeyboardAvoidingView}
+ keyboardVerticalOffset={keyboardVerticalOffset}
+ includePaddingTop={includePaddingTop}
>
{({insets, safeAreaPaddingBottomStyle, didScreenTransitionEnd}) => (
-
+ {shouldShowHeader && (
+
+ )}
{
// If props.children is a function, call it to provide the insets to the children
callOrReturn(children, {insets, safeAreaPaddingBottomStyle, didScreenTransitionEnd})