From 252272cd55aa590dc0b6d08220f97c5e441acba7 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Tue, 28 Apr 2020 20:22:55 +0200 Subject: [PATCH] Changed default transitions --- src/navigation/TabNavigator.js | 52 +++++++++------------------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/src/navigation/TabNavigator.js b/src/navigation/TabNavigator.js index 0008059..8012086 100644 --- a/src/navigation/TabNavigator.js +++ b/src/navigation/TabNavigator.js @@ -23,13 +23,15 @@ import ServicesSectionScreen from "../screens/Services/ServicesSectionScreen"; import AmicaleContactScreen from "../screens/Amicale/AmicaleContactScreen"; import {createScreenCollapsibleStack, getWebsiteStack} from "../utils/CollapsibleUtils"; +const modalTransition = Platform.OS === 'ios' ? TransitionPresets.ModalPresentationIOS : TransitionPresets.ModalSlideFromBottomIOS; + + const defaultScreenOptions = { gestureEnabled: true, cardOverlayEnabled: true, - ...TransitionPresets.ScaleFromCenterAndroid, + ...modalTransition, }; -const modalTransition = Platform.OS === 'ios' ? TransitionPresets.ModalPresentationIOS : TransitionPresets.ModalSlideFromBottomIOS; const ServicesStack = createStackNavigator(); @@ -42,7 +44,7 @@ function ServicesStackComponent() { > {createScreenCollapsibleStack("index", ServicesStack, WebsitesHomeScreen, i18n.t('screens.services'))} {createScreenCollapsibleStack("services-section", ServicesStack, ServicesSectionScreen, "SECTION")} - {createScreenCollapsibleStack("amicale-contact", ServicesStack, AmicaleContactScreen, i18n.t('screens.amicaleAbout'), true, {...modalTransition})} + {createScreenCollapsibleStack("amicale-contact", ServicesStack, AmicaleContactScreen, i18n.t('screens.amicaleAbout'))} ); } @@ -60,10 +62,7 @@ function ProxiwashStackComponent() { ); @@ -79,19 +78,14 @@ function PlanningStackComponent() { screenOptions={defaultScreenOptions} > ); @@ -130,34 +124,22 @@ function HomeStackComponent(initialRoute: string | null, defaultData: { [key: st ); @@ -173,13 +155,7 @@ function PlanexStackComponent() { screenOptions={defaultScreenOptions} > {getWebsiteStack("index", PlanexStack, PlanexScreen, "Planex")} - {createScreenCollapsibleStack( - "group-select", - PlanexStack, - GroupSelectionScreen, - "GROUP SELECT", - true, - {...modalTransition})} + {createScreenCollapsibleStack("group-select", PlanexStack, GroupSelectionScreen, "GROUP SELECT")} ); }