1
- import React , { useContext } from 'react' ;
1
+ import React from 'react' ;
2
2
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
3
- import { View , Text , StyleSheet } from 'react-native' ;
3
+ import { View } from 'react-native' ;
4
4
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5' ;
5
5
6
6
import { primaryColor } from '../theme' ;
7
-
8
- const styles = StyleSheet . create ( {
9
- container : {
10
- flex : 1 ,
11
- alignItems : 'center' ,
12
- justifyContent : 'center' ,
13
- } ,
14
- } ) ;
7
+ import Home from '../screens/Home' ;
8
+ import Message from '../screens/Message' ;
9
+ import Post from '../screens/Post' ;
10
+ import Notification from '../screens/Notification' ;
11
+ import Profile from '../screens/Profile' ;
15
12
16
13
const Tab = createBottomTabNavigator ( ) ;
17
14
18
- function Feed ( ) {
19
- return (
20
- < View style = { styles . container } >
21
- < Text > Feed</ Text >
22
- </ View >
23
- ) ;
24
- }
25
-
26
- function Notifications ( ) {
27
- return (
28
- < View style = { styles . container } >
29
- < Text > Notifications</ Text >
30
- </ View >
31
- ) ;
32
- }
33
-
34
- function Profile ( ) {
35
- return (
36
- < View style = { styles . container } >
37
- < Text > Profile</ Text >
38
- </ View >
39
- ) ;
40
- }
41
-
42
15
export default function TabNavigator ( props ) {
43
16
return (
44
17
< Tab . Navigator
@@ -55,27 +28,37 @@ export default function TabNavigator(props) {
55
28
< FontAwesome5 name = { 'home' } color = { color } size = { size } />
56
29
) ,
57
30
} }
58
- children = { ( ) => < Feed { ...props } /> }
31
+ children = { ( ) => < Home { ...props } /> }
32
+ />
33
+ < Tab . Screen
34
+ name = "Message"
35
+ options = { {
36
+ tabBarLabel : ( ) => < View /> ,
37
+ tabBarIcon : ( { color, size} ) => (
38
+ < FontAwesome5 name = { 'comments' } color = { color } size = { size } />
39
+ ) ,
40
+ } }
41
+ children = { ( ) => < Message { ...props } /> }
59
42
/>
60
43
< Tab . Screen
61
- name = "Notifications1 "
44
+ name = "Post "
62
45
options = { {
63
46
tabBarLabel : ( ) => < View /> ,
64
47
tabBarIcon : ( { color, size} ) => (
65
- < FontAwesome5 name = { 'heart ' } color = { color } size = { size } />
48
+ < FontAwesome5 name = { 'plus ' } color = { color } size = { size } />
66
49
) ,
67
50
} }
68
- children = { ( ) => < Notifications { ...props } /> }
51
+ children = { ( ) => < Post { ...props } /> }
69
52
/>
70
53
< Tab . Screen
71
- name = "Notifications "
54
+ name = "Notification "
72
55
options = { {
73
56
tabBarLabel : ( ) => < View /> ,
74
57
tabBarIcon : ( { color, size} ) => (
75
- < FontAwesome5 name = { 'heart ' } color = { color } size = { size } />
58
+ < FontAwesome5 name = { 'bell ' } color = { color } size = { size } />
76
59
) ,
77
60
} }
78
- children = { ( ) => < Notifications { ...props } /> }
61
+ children = { ( ) => < Notification { ...props } /> }
79
62
/>
80
63
< Tab . Screen
81
64
name = "Profile"
0 commit comments