forked from EvanBacon/firebase-instagram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
executable file
·60 lines (56 loc) · 1.63 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
57
58
59
60
// Import React Navigation
import {
createBottomTabNavigator,
createStackNavigator,
} from 'react-navigation';
import tabBarIcon from './utils/tabBarIcon';
// Import the screens
import FeedScreen from './screens/FeedScreen';
import NewPostScreen from './screens/NewPostScreen';
import SelectPhotoScreen from './screens/SelectPhotoScreen';
// Create our main tab navigator for moving between the Feed and Photo screens
const navigator = createBottomTabNavigator(
{
// The name `Feed` is used later for accessing screens
Feed: {
// Define the component we will use for the Feed screen.
screen: FeedScreen,
navigationOptions: {
// Add a cool Material Icon for this screen
tabBarIcon: tabBarIcon('home'),
},
},
// All the same stuff but for the Photo screen
Photo: {
screen: SelectPhotoScreen,
navigationOptions: {
tabBarIcon: tabBarIcon('add-circle'),
},
},
},
{
// We want to hide the labels and set a nice 2-tone tint system for our tabs
tabBarOptions: {
showLabel: false,
activeTintColor: 'black',
inactiveTintColor: 'gray',
},
},
);
// Create the navigator that pushes high-level screens like the `NewPost` screen.
const stackNavigator = createStackNavigator(
{
Main: {
screen: navigator,
// Set the title for our app when the tab bar screen is present
navigationOptions: { title: 'Instaham 🐷' },
},
// This screen will not have a tab bar
NewPost: NewPostScreen,
},
{
cardStyle: { backgroundColor: 'white' },
},
);
// Export it as the root component
export default stackNavigator;