-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
82 lines (72 loc) · 2.58 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
import React from 'react';
import { Text, View } from 'react-native';
import { createStackNavigator } from '@react-navigation/stack';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { AntDesign } from '@expo/vector-icons';
import Feed from './screens/Feed/index';
import IGTV from './screens/IGTV/index';
import Store from './screens/Store/index';
import Search from './screens/Search/index';
import User from './screens/Search/user';
import CreatePost from './screens/Feed/createpost'
import Notifications from './screens/Feed/notifications';
import Direct from './screens/Feed/direct';
import MessageDirect from './screens/Feed/messagedirect';
const UsersStack = createStackNavigator();
const FeedStack = createStackNavigator();
function FeedTabStack() {
return (
<FeedStack.Navigator>
<FeedStack.Screen name="Feed" component={Feed} options={{headerShown:false,}} />
<FeedStack.Screen name="CreatePost" component={CreatePost} options={{headerTitleAlign:'center',}} />
<FeedStack.Screen name="Notifications" component={Notifications} options={{headerTitleAlign:'center',}} />
<FeedStack.Screen name="Direct" component={Direct} options={{headerTitleAlign:'center',}} />
<FeedStack.Screen name="MessageDirect" component={MessageDirect} options={{headerTitleAlign:'center',}} />
</FeedStack.Navigator>
);
}
function UsersTabStack() {
return (
<UsersStack.Navigator>
<UsersStack.Screen name="Search" component={Search} options={{headerTitleAlign:'center',}} />
<UsersStack.Screen name="User" component={User} options={{headerTitleAlign:'center',}} />
</UsersStack.Navigator>
);
}
const Tab = createBottomTabNavigator();
function MyTabs() {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ color, size }) => {
const icons = {
Feed: 'home',
Search: 'search1',
IGTV:'videocamera',
Store:'shoppingcart'
};
return (
<AntDesign
name={icons[route.name]}
color={color}
size={size}
/>
);
},
})}
>
<Tab.Screen name="Feed" component={FeedTabStack} />
<Tab.Screen name="Search" component={UsersTabStack} />
<Tab.Screen name="IGTV" component={IGTV} />
<Tab.Screen name="Store" component={Store} />
</Tab.Navigator>
);
}
export default function App() {
return (
<NavigationContainer>
<MyTabs />
</NavigationContainer>
);
}