-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
36 lines (33 loc) · 1.15 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import MapScreen from './screens/MapScreen.js';
import AuthScreen from './screens/AuthScreen.js';
import AuthLoadingScreen from './screens/AuthLoadingScreen.js';
import AccountScreen from './screens/AccountScreen.js';
import { createSwitchNavigator, createStackNavigator, createAppContainer, createBottomTabNavigator} from 'react-navigation';
// Implementation of HomeScreen, OtherScreen, SignInScreen, AuthLoadingScreen
// goes here.
const tabBarOptions= {tabBarOptions: {
activeTintColor: '#e2f6fe',
inactiveTintColor: '#96c4ff',
activeBackgroundColor:'#4897f9',
labelStyle: {
fontSize: 12
},
style: {
backgroundColor: '#000',
}
}
}
const AppStack = createBottomTabNavigator({ Map: MapScreen, Account: AccountScreen },tabBarOptions);// contenu connecté
const AuthStack = createStackNavigator({ Auth: AuthScreen });//contenu lorsque non connecté
export default createAppContainer(createSwitchNavigator(
{
AuthLoading: AuthLoadingScreen,//on définit les stack ici
App: AppStack,
Auth: AuthStack
},
{
initialRouteName: 'AuthLoading',
}
));