diff --git a/src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx index 9f06a946c80a..8f5e5e1a5a2a 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import type {PlatformStackNavigationOptions, PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; +import useSplitNavigatorScreenOptions from '@libs/Navigation/AppNavigator/useSplitNavigatorScreenOptions'; +import Animations from '@libs/Navigation/PlatformStackNavigation/navigationOptions/animation'; +import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import type {AuthScreensParamList, SearchFullscreenNavigatorParamList} from '@libs/Navigation/types'; import * as SearchQueryUtils from '@libs/SearchQueryUtils'; import createSearchFullscreenNavigator from '@navigation/AppNavigator/createSearchFullscreenNavigator'; import FreezeWrapper from '@navigation/AppNavigator/FreezeWrapper'; -import useRootNavigatorScreenOptions from '@navigation/AppNavigator/useRootNavigatorScreenOptions'; import type NAVIGATORS from '@src/NAVIGATORS'; import SCREENS from '@src/SCREENS'; import type ReactComponentModule from '@src/types/utils/ReactComponentModule'; @@ -15,18 +16,12 @@ const loadSearchMoneyReportPage = () => require('@pages/Se const Stack = createSearchFullscreenNavigator(); function SearchFullscreenNavigator({route}: PlatformStackScreenProps) { - const rootNavigatorScreenOptions = useRootNavigatorScreenOptions(); - const searchRootScreenOptions: PlatformStackNavigationOptions = { - ...rootNavigatorScreenOptions.fullScreen, - web: { - ...rootNavigatorScreenOptions.fullScreen.web, - cardStyleInterpolator: undefined, - }, - }; + // 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. + const {centralScreen: centralScreenOptions} = useSplitNavigatorScreenOptions(); return ( @@ -34,6 +29,7 @@ function SearchFullscreenNavigator({route}: PlatformStackScreenProps { cardStyle: { height: '100%', }, - cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePanel: true}), + cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true}), }, }, } satisfies RootNavigatorScreenOptions;