-
Notifications
You must be signed in to change notification settings - Fork 42
/
App.js
75 lines (68 loc) · 2.78 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
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Home from './src/components/screens/Home';
import Search from './src/components/screens/Search';
import Reels from './src/components/screens/Reels';
import Activity from './src/components/screens/Activity';
import Profile from './src/components/screens/Profile';
import Ionic from 'react-native-vector-icons/Ionicons';
import Status from './src/components/screenComponents/Status';
import FriendProfile from './src/components/screenComponents/FriendProfile';
import EditProfile from './src/components/screenComponents/EditProfile';
const App = () => {
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
const bottomTabScreen = () => {
return (
<Tab.Navigator
screenOptions={({route}) => ({
tabBarHideOnKeyboard: true,
tabBarShowLabel: false,
headerShown: false,
tabBarStyle: {
height: 50,
},
tabBarIcon: ({focused, size, colour}) => {
let iconName;
if (route.name === 'Home') {
iconName = focused ? 'home-sharp' : 'home-outline';
size = focused ? size + 8 : size + 2;
} else if (route.name === 'Search') {
iconName = focused ? 'search' : 'ios-search-outline';
} else if (route.name === 'Reels') {
iconName = focused
? 'caret-forward-circle'
: 'caret-forward-circle-outline';
} else if (route.name === 'Activity') {
iconName = focused ? 'ios-heart' : 'ios-heart-outline';
} else if (route.name === 'Profile') {
iconName = focused ? 'ios-person-circle' : 'ios-person-outline';
}
return <Ionic name={iconName} size={size} color={colour} />;
},
})}>
<Tab.Screen name="Home" component={Home} />
<Tab.Screen name="Search" component={Search} />
<Tab.Screen name="Reels" component={Reels} />
<Tab.Screen name="Activity" component={Activity} />
<Tab.Screen name="Profile" component={Profile} />
</Tab.Navigator>
);
};
return (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}>
<Stack.Screen name="Bottom" component={bottomTabScreen} />
<Stack.Screen name="Status" component={Status} />
<Stack.Screen name="FriendProfile" component={FriendProfile} />
<Stack.Screen name="EditProfile" component={EditProfile} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;