-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
95 lines (89 loc) · 2.67 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
90
91
92
93
94
95
/* eslint-disable react-native/no-inline-styles */
import 'react-native-gesture-handler';
import React, {useEffect} from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import HomeScreen from './components/HomeScreen';
import Statistics from './components/Statistics';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Info from './components/Info';
import SelfTest from './components/SelfTest';
import GlobalFont from 'react-native-global-font';
//const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
const Drawer = createDrawerNavigator();
const MyTabs = () => {
return (
<Tab.Navigator
initialRouteName="Home"
tabBarOptions={{
activeTintColor: '#FFF',
activeBackgroundColor: '#4C79FF',
tabStyle: {height: 70},
}}>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarLabel: '',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons name="home" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="Statistics"
component={Statistics}
options={{
tabBarLabel: '',
tabBarIcon: ({color, size}) => (
<Ionicons name="ios-stats" color={color} size={size} />
),
}}
/>
<Tab.Screen
name="SelfTest"
component={SelfTest}
options={{
tabBarLabel: '',
tabBarIcon: ({color, size}) => (
<MaterialCommunityIcons
name="stethoscope"
color={color}
size={size}
/>
),
}}
/>
<Tab.Screen
name="Info"
component={Info}
options={{
tabBarLabel: '',
tabBarIcon: ({color, size}) => (
<Ionicons name="ios-information-circle" color={color} size={size} />
),
}}
/>
</Tab.Navigator>
);
};
const App = () => {
useEffect(() => {
let globalFont = 'GraphikRegular';
GlobalFont.applyGlobal(globalFont);
}, []);
return (
<NavigationContainer>
<Drawer.Navigator>
<Drawer.Screen name="Home" component={MyTabs} />
<Drawer.Screen name="Statistics" component={Statistics} />
<Drawer.Screen name="SelfTest" component={SelfTest} />
<Drawer.Screen name="Info" component={Info} />
</Drawer.Navigator>
</NavigationContainer>
);
};
export default App;