This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
56 lines (48 loc) · 1.47 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
55
56
import React from "react";
import { View } from "react-native";
import { Provider } from "react-redux";
import { createAppContainer, createSwitchNavigator } from "react-navigation";
import { createBottomTabNavigator } from "react-navigation-tabs";
import { createStackNavigator } from "react-navigation-stack";
import { Ionicons } from '@expo/vector-icons';
import Authentication from "./src/components/Authentication";
import Home from "./src/components/Home";
import Loading from "./src/components/Loading";
import Settings from "./src/components/Settings";
import Item from "./src/components/Item";
import FlashMessage from "react-native-flash-message";
import store from "./src/data/store";
const homeStack = createStackNavigator({
Home,
Item
},
{
headerMode: "none"
});
homeStack.navigationOptions = {
title: "Accueil",
tabBarIcon: ({ tintColor }) => <Ionicons name="ios-home" size={32} color={tintColor} />
}
Settings.navigationOptions = {
title: "Paramètres",
tabBarIcon: ({ tintColor }) => <Ionicons name="md-settings" size={32} color={tintColor} />
}
const bottomTabNavigator = createBottomTabNavigator({
homeStack,
Settings
});
const switchNavigator = createSwitchNavigator({
Loading,
Authentication,
Home: bottomTabNavigator
});
const App = createAppContainer(switchNavigator);
const Root = props => (
<View style={{flex: 1}}>
<Provider store={store}>
<App />
<FlashMessage position="top" />
</Provider>
</View>
);
export default Root;