@@ -47,7 +47,11 @@ import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
4747/* eslint-disable-next-line */
4848import { NavigationContext } from '@react-navigation/core' ;
4949import { CONFIRMATION_HEADER_CONFIG } from '../constants/perpsConfig' ;
50- import { clearStackNavigatorOptions } from '../../../../constants/navigation/clearStackNavigatorOptions' ;
50+ import {
51+ clearNativeStackNavigatorOptions ,
52+ clearStackNavigatorOptions ,
53+ transparentModalScreenOptions ,
54+ } from '../../../../constants/navigation/clearStackNavigatorOptions' ;
5155
5256const Stack = createNativeStackNavigator < PerpsNavigationParamList > ( ) ;
5357const ModalStack = createStackNavigator ( ) ;
@@ -73,7 +77,7 @@ function getRedesignedConfirmationsHeaderOptions({
7377 title : '' ,
7478 headerBackVisible : false ,
7579 contentStyle : { backgroundColor : 'transparent' } ,
76- presentation : 'transparentModal' ,
80+ ... transparentModalScreenOptions ,
7781 } ;
7882}
7983
@@ -353,9 +357,9 @@ const PerpsScreenStack = () => {
353357 name = { Routes . PERPS . TPSL }
354358 component = { PerpsTPSLView }
355359 options = { {
360+ ...transparentModalScreenOptions ,
356361 title : strings ( 'perps.tpsl.title' ) ,
357362 headerShown : false ,
358- presentation : 'transparentModal' ,
359363 } }
360364 />
361365
@@ -411,12 +415,8 @@ const PerpsScreenStack = () => {
411415 name = { Routes . PERPS . MODALS . CLOSE_POSITION_MODALS }
412416 component = { PerpsClosePositionBottomSheetStack }
413417 options = { {
414- headerShown : false ,
415- contentStyle : {
416- backgroundColor : 'transparent' ,
417- } ,
418- animation : 'none' ,
419- presentation : 'transparentModal' ,
418+ ...clearNativeStackNavigatorOptions ,
419+ ...transparentModalScreenOptions ,
420420 } }
421421 />
422422
@@ -425,12 +425,8 @@ const PerpsScreenStack = () => {
425425 name = { Routes . PERPS . MODALS . ROOT }
426426 component = { PerpsModalStack }
427427 options = { {
428- headerShown : false ,
429- contentStyle : {
430- backgroundColor : 'transparent' ,
431- } ,
432- animation : 'none' ,
433- presentation : 'transparentModal' ,
428+ ...clearNativeStackNavigatorOptions ,
429+ ...transparentModalScreenOptions ,
434430 } }
435431 />
436432
@@ -442,7 +438,7 @@ const PerpsScreenStack = () => {
442438 component = { PayWithModal }
443439 options = { {
444440 headerShown : false ,
445- presentation : 'transparentModal' ,
441+ ... transparentModalScreenOptions ,
446442 } }
447443 />
448444
0 commit comments