-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
63 lines (55 loc) · 1.81 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
import { StatusBar } from 'expo-status-bar';
import { AntDesign } from '@expo/vector-icons';
import React, {useState} from 'react';
import { StyleSheet, Text, View , Image, ImageBackground} from 'react-native';
import Screen_3 from './screens/Screen_3'
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { addUser } from './Api/api';
import IncidentList from './screens/IncidentList';
import EquipmentList from "./screens/EquipmentList";
import DocList from './screens/DocList'
import IncidentForm from './screens/reportIncident';
const Tab = createBottomTabNavigator();
export default function App() {
addUser();
return (
<View style={styles.container}>
<NavigationContainer>
<Tab.Navigator screenOptions={({route})=>({
tabBarIcon:({color, size})=>{
let iconName = "tool";
if (route.name=='Safety Documents') {
iconName='book'
}
else if(route.name == "Report Incident"){
iconName="exclamationcircleo"
}
else if(route.name == "Incidents"){
iconName = "database"
}
return <AntDesign name={iconName} size={size} color={color} />
}
})}>
<Tab.Screen name="Safety Documents" component={DocList} />
<Tab.Screen name="Equipments" component={EquipmentList} />
<Tab.Screen name="Incidents" component={IncidentList} />
<Tab.Screen name="Report Incident" component={IncidentForm} />
</Tab.Navigator>
</NavigationContainer>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
justifyContent: 'center',
backgroundColor: '#fff',
},
logo: {
flex: 1,
width: null,
height: null,
},
});