-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
89 lines (81 loc) · 2.61 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import React from 'react';
import { Image } from 'react-native';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
import { enableScreens } from 'react-native-screens';
import * as Sentry from 'sentry-expo';
import TabBarIcon from './components/TabBarIcon';
import HomeScreen from './screens/HomeScreen';
import ProfileScreen from './screens/ProfileScreen';
import GamesScreen from './screens/GamesScreen';
import EventScreen from './screens/EventScreen';
import EventRegistrationScreen from './screens/EventRegistrationScreen';
import SettingsScreen from './screens/SettingsScreen';
import Colors from './constants/Colors';
enableScreens();
Sentry.init({
dsn: 'https://[email protected]/2187549',
enableInExpoDevelopment: false,
debug: true
});
const MaterialBottomTabNavigator = createMaterialBottomTabNavigator({
ProfileScreen: {
screen: ProfileScreen,
navigationOptions: {
tabBarIcon: ({ focused }) => (<TabBarIcon focused={focused} name={'person-outline'} />),
},
},
HomeScreen: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({ focused }) => (focused ? <Image source={require('./assets/images/tihlde_logo_blaa_liten.png')} style={{width: 36, height: 36, marginTop: -8}}/> : <Image source={require('./assets/images/tihlde_logo_graa_liten.png')} style={{width: 36, height: 36, marginTop: -8}}/>),
},
},
GamesScreen: {
screen: GamesScreen,
navigationOptions: {
tabBarIcon: ({ focused }) => (<TabBarIcon focused={focused} name={'play-arrow'} />),
},
},
}, {
initialRouteName: 'HomeScreen',
activeColor: Colors.tabIconSelected,
inactiveColor: Colors.tabIconDefault,
barStyle: { backgroundColor: '#ffffff' },
}
);
const AppStack = createStackNavigator({
Home: {
screen: MaterialBottomTabNavigator,
navigationOptions: {
headerShown: false
}
},
Event: {
screen: EventScreen,
navigationOptions: {
headerShown: false
}
},
EventRegistration: {
screen: EventRegistrationScreen,
navigationOptions: {
headerShown: false
}
},
Settings: {
screen: SettingsScreen,
navigationOptions: {
headerShown: false
}
},
},
{
headerMode: 'none',
navigationOptions: {
headerVisible: false,
},
initialRouteName: 'Home',
});
export default createAppContainer(AppStack);