update
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
import React from "react";
|
||||
import { createStackNavigator } from "@react-navigation/stack";
|
||||
|
||||
import { Palette } from "../styles";
|
||||
import { Routes } from "./Routes";
|
||||
|
||||
import { BottomTabScreen } from "./BottomTab";
|
||||
|
||||
import Splash from "../screens/Splash";
|
||||
import Onboarding from "../screens/Onboarding";
|
||||
import Login from "../screens/Login";
|
||||
import ForgotPassword from "../screens/ForgotPassword";
|
||||
|
||||
import Notifications from "../screens/Notifications";
|
||||
|
||||
import TermsOfUse from "../screens/TermsOfUse";
|
||||
import PrivacyPolicy from "../screens/PrivacyPolicy";
|
||||
import Writing from "../screens/Writing/Writing";
|
||||
import WritingLyrics from "../screens/Writing/WritingLyrics";
|
||||
|
||||
const screenOptions = {
|
||||
headerShown: false,
|
||||
cardOverlayEnabled: true,
|
||||
headerStyle: {
|
||||
backgroundColor: Palette.background,
|
||||
},
|
||||
headerTitleStyle: {},
|
||||
headerTitleAlign: "center",
|
||||
headerBackTitleVisible: false,
|
||||
};
|
||||
|
||||
const MainStack = createStackNavigator();
|
||||
|
||||
const screens = [
|
||||
{ name: Routes.Splash, component: Splash },
|
||||
{ name: Routes.Onboarding, component: Onboarding },
|
||||
{ name: Routes.Login, component: Login, title: "Connexion" },
|
||||
{
|
||||
name: Routes.ForgotPassword,
|
||||
component: ForgotPassword,
|
||||
title: "Mot de passe oublié",
|
||||
},
|
||||
{
|
||||
name: Routes.BottomTab,
|
||||
component: BottomTabScreen,
|
||||
options: { animationEnabled: false },
|
||||
},
|
||||
{
|
||||
name: Routes.Notifications,
|
||||
component: Notifications,
|
||||
title: "Notifications",
|
||||
},
|
||||
{
|
||||
name: Routes.TermsOfUse,
|
||||
component: TermsOfUse,
|
||||
title: "Conditions d'utilisation",
|
||||
},
|
||||
{
|
||||
name: Routes.PrivacyPolicy,
|
||||
component: PrivacyPolicy,
|
||||
title: "Politique de confidentialité",
|
||||
},
|
||||
{
|
||||
name: Routes.Writing,
|
||||
component: Writing,
|
||||
},
|
||||
{
|
||||
name: Routes.WritingLyrics,
|
||||
component: WritingLyrics,
|
||||
},
|
||||
];
|
||||
|
||||
export default function Main() {
|
||||
return (
|
||||
<MainStack.Navigator
|
||||
initialRouteName={Routes.Splash}
|
||||
screenOptions={[
|
||||
{
|
||||
contentStyle: {
|
||||
backgroundColor: Palette.white,
|
||||
},
|
||||
},
|
||||
screenOptions,
|
||||
]}
|
||||
>
|
||||
{screens.map((screen) => (
|
||||
<MainStack.Screen
|
||||
key={screen.name}
|
||||
name={screen.name}
|
||||
component={screen.component}
|
||||
title={screen.title}
|
||||
options={{ headerShown: false, ...screen.options }}
|
||||
/>
|
||||
))}
|
||||
</MainStack.Navigator>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user