-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
92 lines (88 loc) · 2.59 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
import React,{useEffect} from 'react';
import 'react-native-gesture-handler';
import {NavigationContainer} from '@react-navigation/native';
import {StyleSheet, View, Text} from 'react-native'
import Saved from './screens/Saved';
import Inbox from './screens/Inbox';
import Trips from './screens/Trips';
import Explore from './screens/Explore';
import Profile from './screens/Profile';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import Icon from 'react-native-vector-icons/FontAwesome';
const Tab = createBottomTabNavigator();
import SplashScreen from 'react-native-splash-screen';
const App = () => {
useEffect(() => {
//write Code to Perform async here...
SplashScreen.hide();
}, [])
return (
<NavigationContainer style={styles.conntainer}>
<Tab.Navigator
initialRouteName={Explore }
tabBarOptions={{
activeTintColor:'red',
inactiveTintColor:'grey',
style:{
backgroundColor:'white',
borderTopWidth:0,
shadowColor:'black',
shadowOpacity:0.5,
elevation:5,
shadowOffset:{width:5, height:3}
}
}}
>
<Tab.Screen name="Explore" component={Explore}
options={{
tabBarLabel: 'EXPLORE',
tabBarIcon: ({ color, size }) => (
<Icon name="search" color={color} size={size}/>
),
}}
/>
<Tab.Screen name="Saved" component={Saved}
options={{
tabBarLabel: 'SAVED',
tabBarIcon: ({ color, size }) => (
<Icon name="heart" color={color} size={size}/>
),
}}
/>
<Tab.Screen name="Trips" component={Trips}
options={{
tabBarLabel: 'TRIPS',
tabBarIcon: ({ color, size }) => (
<Icon name="car" color={color} size={size}/>
),
}}
/>
<Tab.Screen name="Inbox" component={Inbox}
options={{
tabBarLabel: 'INBOX',
tabBarIcon: ({ color, size }) => (
<Icon name="inbox" color={color} size={size}/>
),
}}
/>
<Tab.Screen name="Profile" component={Profile}
options={{
tabBarLabel: 'PROFILES',
tabBarIcon: ({ color, size }) => (
<Icon name="user" color={color} size={size}/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
)
}
const styles = StyleSheet.create({
conntainer:{
flex:1,
backgroundColor:'#fff',
alignItems:'center',
justifyContent:'center'
}
})
export default App