-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
158 lines (152 loc) · 4.45 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import HomeScreen from './screens/HomeScreen';
import Summary from './screens/Summary';
import TempVsTime from './screens/TempVsTime';
import VoltageVsTime from './screens/VoltageVsTime';
import CurrentVsTime from './screens/CurrentVsTime';
import PowerVsTime from './screens/PowerVsTIme';
import Statistics from './screens/Statistics';
import Map from './screens/Map';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import {Colors} from './constants/Colors';
import BluetoothScanner from './util/Bluetooth';
import Dashboard from './screens/Dashboard';
import {Text} from 'react-native';
const Stack = createStackNavigator();
const BottomTab = createBottomTabNavigator();
function WelcomePage() {
return (
<BottomTab.Navigator
screenOptions={{
headerStyle: {
backgroundColor: '#191825',
borderBottomColor: 'white',
borderBottomWidth: 1,
},
headerTintColor: 'white',
tabBarStyle: {
backgroundColor: '#191825',
borderTopWidth: 0,
borderTopEndRadius: 24,
borderTopStartRadius: 24,
height: 60,
},
headerTitleAlign: 'center',
// tabBarActiveBackgroundColor:'#282A3A',
// tabBarInactiveBackgroundColor:'#282A3A',
tabBarActiveTintColor: 'white',
tabBarInactiveTintColor: '#3A98B9',
}}>
<BottomTab.Screen
name="Summary"
component={Summary}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="live-tv" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Temp Vs Time"
component={TempVsTime}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="device-thermostat" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Voltage Vs Time"
component={VoltageVsTime}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="power" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Current Vs Time"
component={CurrentVsTime}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="power-input" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Power Vs Time"
component={PowerVsTime}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="settings-power" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Statistics"
component={Statistics}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons
name="stacked-line-chart"
color={color}
size={size}
/>
),
title: 'Cell Doc',
}}
/>
<BottomTab.Screen
name="Map"
component={Map}
options={{
tabBarShowLabel: false,
tabBarIcon: ({color, size}) => (
<MaterialIcons name="location-pin" color={color} size={size} />
),
title: 'Cell Doc',
}}
/>
</BottomTab.Navigator>
);
}
function App() {
return (
<NavigationContainer
theme={{
colors: {
background: Colors.bgColor,
},
}}>
<Stack.Navigator>
<Stack.Screen
name="HomeScreen"
component={HomeScreen}
options={{headerShown: false}}
/>
<Stack.Screen
name="Details"
component={WelcomePage}
options={{headerShown: false}}
/>
<Stack.Screen name="Bluetooth" component={BluetoothScanner} />
<Stack.Screen name="Dashboard" component={Dashboard} />
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;