1
- import type { StackCardInterpolationProps , StackScreenProps } from '@react-navigation/stack' ;
2
- import { createStackNavigator } from '@react-navigation/stack' ;
1
+ import type { StackCardInterpolationProps } from '@react-navigation/stack' ;
3
2
import React , { useMemo , useRef } from 'react' ;
4
3
import { InteractionManager , View } from 'react-native' ;
5
4
import NoDropZone from '@components/DragAndDrop/NoDropZone' ;
@@ -8,17 +7,20 @@ import useStyleUtils from '@hooks/useStyleUtils';
8
7
import useThemeStyles from '@hooks/useThemeStyles' ;
9
8
import { abandonReviewDuplicateTransactions } from '@libs/actions/Transaction' ;
10
9
import { isSafari } from '@libs/Browser' ;
10
+ import hideKeyboardOnSwipe from '@libs/Navigation/AppNavigator/hideKeyboardOnSwipe' ;
11
11
import ModalNavigatorScreenOptions from '@libs/Navigation/AppNavigator/ModalNavigatorScreenOptions' ;
12
12
import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators' ;
13
+ import createPlatformStackNavigator from '@libs/Navigation/PlatformStackNavigation/createPlatformStackNavigator' ;
14
+ import type { PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
13
15
import createModalCardStyleInterpolator from '@navigation/AppNavigator/createModalCardStyleInterpolator' ;
14
16
import type { AuthScreensParamList , RightModalNavigatorParamList } from '@navigation/types' ;
15
17
import NAVIGATORS from '@src/NAVIGATORS' ;
16
18
import SCREENS from '@src/SCREENS' ;
17
19
import Overlay from './Overlay' ;
18
20
19
- type RightModalNavigatorProps = StackScreenProps < AuthScreensParamList , typeof NAVIGATORS . RIGHT_MODAL_NAVIGATOR > ;
21
+ type RightModalNavigatorProps = PlatformStackScreenProps < AuthScreensParamList , typeof NAVIGATORS . RIGHT_MODAL_NAVIGATOR > ;
20
22
21
- const Stack = createStackNavigator < RightModalNavigatorParamList > ( ) ;
23
+ const Stack = createPlatformStackNavigator < RightModalNavigatorParamList > ( ) ;
22
24
23
25
function RightModalNavigator ( { navigation, route} : RightModalNavigatorProps ) {
24
26
const styles = useThemeStyles ( ) ;
@@ -30,7 +32,9 @@ function RightModalNavigator({navigation, route}: RightModalNavigatorProps) {
30
32
// The .forHorizontalIOS interpolator from `@react-navigation` is misbehaving on Safari, so we override it with Expensify custom interpolator
31
33
if ( isSafari ( ) ) {
32
34
const customInterpolator = createModalCardStyleInterpolator ( styleUtils ) ;
33
- options . cardStyleInterpolator = ( props : StackCardInterpolationProps ) => customInterpolator ( shouldUseNarrowLayout , false , false , props ) ;
35
+ if ( options . web ) {
36
+ options . web . cardStyleInterpolator = ( props : StackCardInterpolationProps ) => customInterpolator ( shouldUseNarrowLayout , false , false , props ) ;
37
+ }
34
38
}
35
39
36
40
return options ;
@@ -162,6 +166,7 @@ function RightModalNavigator({navigation, route}: RightModalNavigatorProps) {
162
166
< Stack . Screen
163
167
name = { SCREENS . RIGHT_MODAL . PRIVATE_NOTES }
164
168
component = { ModalStackNavigators . PrivateNotesModalStackNavigator }
169
+ options = { hideKeyboardOnSwipe }
165
170
/>
166
171
< Stack . Screen
167
172
name = "ProcessMoneyRequestHold"
0 commit comments