-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
54 lines (48 loc) · 1.53 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
45
46
47
48
49
50
51
52
53
54
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import { TabNavigator, StackNavigator } from 'react-navigation';
import reducers from './src/reducers';
// import AppNavigator from './src/AppNavigator';
import Auth from './src/components/Auth';
import ChatUI from './src/components/ChatUI';
import FoodDetail from './src/components/FoodDetail';
import RecipeDetail from './src/components/RecipeDetail';
import NutritionDetails from './src/components/NutritionDetails';
import PreloadHOC from './src/components/PreloadHOC';
import LogOut from './src/components/LogOut';
import SignUp from './src/components/SignUp';
class App extends Component {
state = { loggedIn: null };
componentWillMount() {
console.log(reducers)
}
render() {
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
const MainNavigator = TabNavigator({
auth: { screen: Auth },
main: {
screen: StackNavigator({
chatUI: {screen: ChatUI},
foodDetail: {screen: FoodDetail},
recipeDetail: {screen: RecipeDetail},
nutritionDetails: {screen: NutritionDetails},
logOut: {screen: LogOut},
})
},
signUp: {screen: SignUp},
}, {
navigationOptions: {
tabBarVisible: false
},
lazy: true
});
return (
<Provider store={store}>
<MainNavigator />
</Provider>
);
}
}
export default PreloadHOC(App);