@@ -8,7 +8,9 @@ import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
88import useOnyx from '@hooks/useOnyx' ;
99import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
1010import useThemeStyles from '@hooks/useThemeStyles' ;
11+ import { isMobileSafari } from '@libs/Browser' ;
1112import GoogleTagManager from '@libs/GoogleTagManager' ;
13+ import useCustomScreenOptions from '@libs/Navigation/AppNavigator/useCustomScreenOptions' ;
1214import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator' ;
1315import type { PlatformStackNavigationOptions } from '@libs/Navigation/PlatformStackNavigation/types' ;
1416import type { OnboardingModalNavigatorParamList } from '@libs/Navigation/types' ;
@@ -30,16 +32,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
3032import SCREENS from '@src/SCREENS' ;
3133import Overlay from './Overlay' ;
3234
33- const defaultScreenOptions : PlatformStackNavigationOptions = {
34- headerShown : false ,
35- web : {
36- cardStyleInterpolator : CardStyleInterpolators . forHorizontalIOS ,
37- cardStyle : {
38- height : '100%' ,
39- } ,
40- } ,
41- } ;
42-
4335const Stack = createPlatformStackNavigator < OnboardingModalNavigatorParamList > ( ) ;
4436
4537function OnboardingModalNavigator ( ) {
@@ -50,6 +42,7 @@ function OnboardingModalNavigator() {
5042 const [ onboardingPurposeSelected ] = useOnyx ( ONYXKEYS . ONBOARDING_PURPOSE_SELECTED , { canBeMissing : true } ) ;
5143 const [ onboardingPolicyID ] = useOnyx ( ONYXKEYS . ONBOARDING_POLICY_ID , { canBeMissing : true } ) ;
5244 const isOnPrivateDomainAndHasAccessiblePolicies = ! account ?. isFromPublicDomain && account ?. hasAccessibleDomainPolicies ;
45+ const customScreenOptions = useCustomScreenOptions ( ) ;
5346
5447 let initialRouteName : ValueOf < typeof SCREENS . ONBOARDING > = SCREENS . ONBOARDING . PURPOSE ;
5548
@@ -91,6 +84,16 @@ function OnboardingModalNavigator() {
9184 return null ;
9285 }
9386
87+ const defaultScreenOptions : PlatformStackNavigationOptions = {
88+ headerShown : false ,
89+ web : {
90+ ...( isMobileSafari ( ) ? customScreenOptions . web : { cardStyleInterpolator : CardStyleInterpolators . forHorizontalIOS } ) ,
91+ cardStyle : {
92+ height : '100%' ,
93+ } ,
94+ } ,
95+ } ;
96+
9497 return (
9598 < NoDropZone >
9699 < Overlay />
0 commit comments