-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
44 lines (41 loc) · 1.37 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
37
38
39
40
41
42
43
44
import React, {Component, applyMiddleware, compose} from 'react';
import {StatusBar, View} from 'react-native';
import {createAppContainer,createStackNavigator, createDrawerNavigator, createSwitchNavigator} from 'react-navigation'
import globalColors from './src/utils/colors';
import AuthLoading from './src/pages/AuthLoading'
import {Provider} from 'react-redux'
import store from './src/store/store';
import CustomDrawerComponent from './src/settings/CustomDrawerComponent'
import DrawerRouteConfig from './src/settings/DrawerNavigationConfig'
import RouteAuthConfig from './src/settings/RouteAuthConfig'
import {AppStack} from './src/utils/screens'
const DrawerStack = createDrawerNavigator(DrawerRouteConfig,{
contentComponent: CustomDrawerComponent,
drawerWidth :380,
initialRouteName:AppStack.MyRecipientsCouriers
});
const AuthStack = createStackNavigator(RouteAuthConfig );
const AppContainer = createAppContainer(
createSwitchNavigator(
{
AuthLoading: AuthLoading,
App: DrawerStack,
Auth: AuthStack,
},
{
initialRouteName: 'AuthLoading',
}
)
);
export default class App extends Component {
render() {
return (
<Provider store={store}>
<View style={{flex:1}}>
<StatusBar backgroundColor={globalColors.baseBlue} barStyle="ligth-content" />
<AppContainer/>
</View>
</Provider>
);
}
}