-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
57 lines (51 loc) · 1.68 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
// Made by Eric Stein
import * as React from 'react';
import Icon from 'react-native-vector-icons/FontAwesome'
import IconFA5 from 'react-native-vector-icons/FontAwesome5'
import {
StyleSheet,
Dimensions,
} from 'react-native';
import Constants from 'expo-constants';
import {createAppContainer} from "react-navigation";
import {createMaterialBottomTabNavigator} from "react-navigation-material-bottom-tabs";
const { height, width } = Dimensions.get('window');
import * as firebase from 'firebase';
import CollectionScreen from "./Screens/CollectionScreen";
import PredictionScreen from "./Screens/PredictionScreen";
import PredictionScreenUsingServer from "./Screens/PredictionScreenUsingServer"
import firebaseConfig from "./FirebaseConfig";
// Initialize Firebase (if not yet initialized)
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
// Create a navigation tab at the bottom of the screen
const MainNavigator = createMaterialBottomTabNavigator({
// Add the CollectionScreen as an option
PredictionScreen: { // Add the PredictionScreen as an option
screen: PredictionScreenUsingServer,
navigationOptions: () => ({
title: "Predict",
tabBarLabel: 'Predict',
tabBarIcon: <Icon name={"list"} size={20} color={"white"} />,
})
},
CollectionScreen: {
screen: CollectionScreen,
navigationOptions: ({navigation}) => {
return({
title: 'Collect',
tabBarLabel: 'Collect',
tabBarIcon: <Icon name={"map"} size={20} color={"white"}/>,
gesturesEnabled: true,
})
}
}
}, {
labeled: true,
barStyle: {
backgroundColor: '#e35e13'
}
})
const App = createAppContainer(MainNavigator)
export default App