1
1
import React from 'react' ;
2
- import type { PlatformStackNavigationOptions , PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
2
+ import useSplitNavigatorScreenOptions from '@libs/Navigation/AppNavigator/useSplitNavigatorScreenOptions' ;
3
+ import Animations from '@libs/Navigation/PlatformStackNavigation/navigationOptions/animation' ;
4
+ import type { PlatformStackScreenProps } from '@libs/Navigation/PlatformStackNavigation/types' ;
3
5
import type { AuthScreensParamList , SearchFullscreenNavigatorParamList } from '@libs/Navigation/types' ;
4
6
import * as SearchQueryUtils from '@libs/SearchQueryUtils' ;
5
7
import createSearchFullscreenNavigator from '@navigation/AppNavigator/createSearchFullscreenNavigator' ;
6
8
import FreezeWrapper from '@navigation/AppNavigator/FreezeWrapper' ;
7
- import useRootNavigatorScreenOptions from '@navigation/AppNavigator/useRootNavigatorScreenOptions' ;
8
9
import type NAVIGATORS from '@src/NAVIGATORS' ;
9
10
import SCREENS from '@src/SCREENS' ;
10
11
import type ReactComponentModule from '@src/types/utils/ReactComponentModule' ;
@@ -15,25 +16,20 @@ const loadSearchMoneyReportPage = () => require<ReactComponentModule>('@pages/Se
15
16
const Stack = createSearchFullscreenNavigator < SearchFullscreenNavigatorParamList > ( ) ;
16
17
17
18
function SearchFullscreenNavigator ( { route} : PlatformStackScreenProps < AuthScreensParamList , typeof NAVIGATORS . SEARCH_FULLSCREEN_NAVIGATOR > ) {
18
- const rootNavigatorScreenOptions = useRootNavigatorScreenOptions ( ) ;
19
- const searchRootScreenOptions : PlatformStackNavigationOptions = {
20
- ...rootNavigatorScreenOptions . fullScreen ,
21
- web : {
22
- ...rootNavigatorScreenOptions . fullScreen . web ,
23
- cardStyleInterpolator : undefined ,
24
- } ,
25
- } ;
19
+ // These options can be used here because the full screen navigator has the same structure as the split navigator in terms of the central screens, but it does not have a sidebar.
20
+ const { centralScreen : centralScreenOptions } = useSplitNavigatorScreenOptions ( ) ;
26
21
return (
27
22
< FreezeWrapper >
28
23
< Stack . Navigator
29
- screenOptions = { searchRootScreenOptions }
24
+ screenOptions = { centralScreenOptions }
30
25
defaultCentralScreen = { SCREENS . SEARCH . ROOT }
31
26
parentRoute = { route }
32
27
>
33
28
< Stack . Screen
34
29
name = { SCREENS . SEARCH . ROOT }
35
30
getComponent = { loadSearchPage }
36
31
initialParams = { { q : SearchQueryUtils . buildSearchQueryString ( ) } }
32
+ options = { { animation : Animations . NONE } }
37
33
/>
38
34
< Stack . Screen
39
35
name = { SCREENS . SEARCH . MONEY_REQUEST_REPORT }
0 commit comments