Skip to content

Commit 4247b3f

Browse files
committed
Merge branch 'develop' into feature/search
2 parents 8d6df17 + 5fcefd0 commit 4247b3f

File tree

3 files changed

+194
-6
lines changed

3 files changed

+194
-6
lines changed

package-lock.json

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@reduxjs/toolkit": "^2.2.1",
1919
"react": "18.2.0",
2020
"react-native": "^0.73.5",
21+
"react-native-heroicons": "^4.0.0",
2122
"react-native-logs": "^5.1.0",
2223
"react-native-safe-area-context": "^4.9.0",
2324
"react-native-screens": "^3.29.0",

src/components/navigators/TabBarNavigation/TabNavigator.tsx

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useEffect} from 'react';
22
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";
44
import {useNavigation} from '@react-navigation/native';
55

66
import AccountNavigator from '../AccountNavigator';
@@ -11,6 +11,7 @@ import {
1111
import { Imager } from '../../../screens/imager/Imager';
1212
import { Search } from '../../../screens/search/Search.tsx';
1313
import CarrotNavigator from '../CarrotNavigator/CarrotNavigator.tsx';
14+
import {Image, Text, View} from 'react-native';
1415

1516
const Tab = createBottomTabNavigator<TabBarNavigatorParamList>();
1617

@@ -36,15 +37,42 @@ const TabNavigator = () => {
3637
<Tab.Navigator
3738
initialRouteName={TAB_BAR_NAVIGATOR_ROUTES.PLATE}
3839
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: '',
4068
}}>
4169
<Tab.Screen
4270
name={TAB_BAR_NAVIGATOR_ROUTES.CARROT}
4371
component={CarrotNavigator}
4472
options={{
4573
tabBarLabel: 'Last Scan',
4674
tabBarIcon: ({color, size}) => (
47-
<Icon name="home" color={color} size={size} />
75+
<Icons.PlusIcon color={color} size={size} />
4876
),
4977
}}
5078
/>
@@ -54,7 +82,7 @@ const TabNavigator = () => {
5482
options={{
5583
tabBarLabel: 'Plats',
5684
tabBarIcon: ({color, size}) => (
57-
<Icon name="home" color={color} size={size} />
85+
<Icons.MapIcon color={color} size={size} />
5886
),
5987
}}
6088
/>
@@ -64,7 +92,7 @@ const TabNavigator = () => {
6492
options={{
6593
tabBarLabel: 'QRScan',
6694
tabBarIcon: ({color, size}) => (
67-
<Icon name="home" color={color} size={size} />
95+
<Icons.QrCodeIcon color={color} size={size} />
6896
),
6997
}}
7098
/>
@@ -74,7 +102,7 @@ const TabNavigator = () => {
74102
options={{
75103
tabBarLabel: 'Search',
76104
tabBarIcon: ({color, size}) => (
77-
<Icon name="home" color={color} size={size} />
105+
<Icons.MagnifyingGlassIcon color={color} size={size} />
78106
),
79107
}}
80108
/>
@@ -86,6 +114,9 @@ const TabNavigator = () => {
86114
tabBarStyle: {
87115
display: 'flex',
88116
},
117+
tabBarIcon: ({color, size}) => (
118+
<Icons.UserIcon color={color} size={size} />
119+
),
89120
};
90121
}}
91122
/>

0 commit comments

Comments
 (0)