-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
executable file
·58 lines (50 loc) · 1.45 KB
/
main.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import Expo, { Constants } from "expo";
import React from "react";
import { StyleSheet, Text, View, Platform, Dimensions } from "react-native";
import { TabNavigator, StackNavigator } from "react-navigation";
// import { Provider } from 'react-redux';
// import storeRedux from './redux/store'
import AuthScreen from "./src/screens/AuthScreen";
import WelcomeScreen from "./src/screens/WelcomeScreen";
import PatientScreen from "./src/screens/PatientScreen";
import NutritionOrderScreen from "./src/screens/NutritionOrderScreen";
class App extends React.Component {
render() {
const MainNavigator = TabNavigator(
{
auth: { screen: AuthScreen },
welcome: { screen: WelcomeScreen },
main: {
screen: TabNavigator({
patient: { screen: PatientScreen },
nutritionOrder: { screen: NutritionOrderScreen }
})
}
},
{
tabBarOptions: {
activeTintColor: Platform.OS === "ios" ? "#e91e63" : "#fff"
}
},
{
lazy: true
}
);
return (
//<Provider store={storeRedux}>
<MainNavigator style={styles.container} />
//</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#bbb",
alignItems: "center",
justifyContent: "center",
marginTop: Platform.OS === "ios" ? 20 : 0,
width: Dimensions.get("window").width
}
});
Expo.registerRootComponent(App);