fix flash & dropdown
This commit is contained in:
@@ -83,7 +83,7 @@ const screenOptions = {
|
||||
|
||||
const MainStack = createStackNavigator();
|
||||
|
||||
const screens = [
|
||||
const baseScreens = [
|
||||
{ name: Routes.Splash, component: Splash },
|
||||
{ name: Routes.Onboarding, component: Onboarding },
|
||||
{ name: Routes.Login, component: Login, title: "Connexion" },
|
||||
@@ -306,6 +306,38 @@ const screens = [
|
||||
},
|
||||
];
|
||||
|
||||
const transparentSettingsRoutes = new Set([
|
||||
Routes.ChangeEmailAddress,
|
||||
Routes.ChangePassword,
|
||||
Routes.Notifications,
|
||||
Routes.Language,
|
||||
]);
|
||||
|
||||
const screens = baseScreens.map((screen) => {
|
||||
if (!transparentSettingsRoutes.has(screen.name)) {
|
||||
return screen;
|
||||
}
|
||||
|
||||
const existingOptions = screen.options || {};
|
||||
return {
|
||||
...screen,
|
||||
options: {
|
||||
...existingOptions,
|
||||
animationEnabled: false,
|
||||
presentation: "transparentModal",
|
||||
cardOverlayEnabled: true,
|
||||
contentStyle: {
|
||||
...(existingOptions.contentStyle || {}),
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
cardStyle: {
|
||||
...(existingOptions.cardStyle || {}),
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export default function Main() {
|
||||
return (
|
||||
<MainStack.Navigator
|
||||
|
||||
Reference in New Issue
Block a user