1
1
import React , { useEffect } from 'react' ;
2
2
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
3
- import Icon from ' react-native-vector-icons/MaterialCommunityIcons' ;
3
+ import * as Icons from " react-native-heroicons/solid" ;
4
4
import { useNavigation } from '@react-navigation/native' ;
5
5
6
6
import AccountNavigator from '../AccountNavigator' ;
@@ -11,6 +11,7 @@ import {
11
11
import { Imager } from '../../../screens/imager/Imager' ;
12
12
import { Search } from '../../../screens/search/Search.tsx' ;
13
13
import CarrotNavigator from '../CarrotNavigator/CarrotNavigator.tsx' ;
14
+ import { Image , Text , View } from 'react-native' ;
14
15
15
16
const Tab = createBottomTabNavigator < TabBarNavigatorParamList > ( ) ;
16
17
@@ -36,15 +37,42 @@ const TabNavigator = () => {
36
37
< Tab . Navigator
37
38
initialRouteName = { TAB_BAR_NAVIGATOR_ROUTES . PLATE }
38
39
screenOptions = { {
39
- headerShown : false ,
40
+ headerShown : true ,
41
+ // Set logo in left side of header
42
+ headerLeft : ( ) => (
43
+ < View style = { { flexDirection : 'row' , alignItems : 'center' } } >
44
+ < Image
45
+ source = { require ( '../../../../assets/kayu.png' ) }
46
+ style = { { width : 40 , height : 40 } }
47
+ />
48
+ < Text
49
+ style = { {
50
+ fontSize : 20 ,
51
+ fontWeight : 'bold' ,
52
+ color : 'black' ,
53
+ } } >
54
+ Kayu
55
+ </ Text >
56
+ </ View >
57
+ ) ,
58
+ headerRight : ( ) => (
59
+ < Icon
60
+ name = "camera"
61
+ size = { 25 }
62
+ color = "black"
63
+ style = { { marginRight : 10 } }
64
+ onPress = { ( ) => navigate ( TAB_BAR_NAVIGATOR_ROUTES . QRSCAN ) }
65
+ />
66
+ ) ,
67
+ headerTitle : '' ,
40
68
} } >
41
69
< Tab . Screen
42
70
name = { TAB_BAR_NAVIGATOR_ROUTES . CARROT }
43
71
component = { CarrotNavigator }
44
72
options = { {
45
73
tabBarLabel : 'Last Scan' ,
46
74
tabBarIcon : ( { color, size} ) => (
47
- < Icon name = "home" color = { color } size = { size } />
75
+ < Icons . PlusIcon color = { color } size = { size } />
48
76
) ,
49
77
} }
50
78
/>
@@ -54,7 +82,7 @@ const TabNavigator = () => {
54
82
options = { {
55
83
tabBarLabel : 'Plats' ,
56
84
tabBarIcon : ( { color, size} ) => (
57
- < Icon name = "home" color = { color } size = { size } />
85
+ < Icons . MapIcon color = { color } size = { size } />
58
86
) ,
59
87
} }
60
88
/>
@@ -64,7 +92,7 @@ const TabNavigator = () => {
64
92
options = { {
65
93
tabBarLabel : 'QRScan' ,
66
94
tabBarIcon : ( { color, size} ) => (
67
- < Icon name = "home" color = { color } size = { size } />
95
+ < Icons . QrCodeIcon color = { color } size = { size } />
68
96
) ,
69
97
} }
70
98
/>
@@ -74,7 +102,7 @@ const TabNavigator = () => {
74
102
options = { {
75
103
tabBarLabel : 'Search' ,
76
104
tabBarIcon : ( { color, size} ) => (
77
- < Icon name = "home" color = { color } size = { size } />
105
+ < Icons . MagnifyingGlassIcon color = { color } size = { size } />
78
106
) ,
79
107
} }
80
108
/>
@@ -86,6 +114,9 @@ const TabNavigator = () => {
86
114
tabBarStyle : {
87
115
display : 'flex' ,
88
116
} ,
117
+ tabBarIcon : ( { color, size} ) => (
118
+ < Icons . UserIcon color = { color } size = { size } />
119
+ ) ,
89
120
} ;
90
121
} }
91
122
/>
0 commit comments