fix flash & dropdown

This commit is contained in:
2025-10-24 10:29:08 +02:00
parent 7294a128a9
commit 4812e503a4
2 changed files with 75 additions and 13 deletions
+33 -1
View File
@@ -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