diff --git a/src/components/RestaurantSearch.js b/src/components/RestaurantSearch.js index 388191a34..3027ae910 100644 --- a/src/components/RestaurantSearch.js +++ b/src/components/RestaurantSearch.js @@ -36,10 +36,14 @@ const styles = StyleSheet.create({ borderRadius: 4, paddingVertical: 8, paddingHorizontal: 12, + paddingRight: 4, flexDirection: 'row', alignItems: 'center', gap: 8, }, + text: { + flex: 1, + }, }); const IconPin = ({ color }) => ( @@ -74,7 +78,11 @@ function RestaurantSearch(props) { }}> - + {props.defaultValue?.streetAddress} diff --git a/src/navigation/navigators/CheckoutNavigator.js b/src/navigation/navigators/CheckoutNavigator.js index c9e6c7178..d66e141fc 100644 --- a/src/navigation/navigators/CheckoutNavigator.js +++ b/src/navigation/navigators/CheckoutNavigator.js @@ -4,7 +4,7 @@ import { TransitionPresets, createStackNavigator, } from '@react-navigation/stack'; -import { Icon, Text } from 'native-base'; +import { Icon, Text, useColorModeValue } from 'native-base'; import React from 'react'; import { TouchableOpacity } from 'react-native'; import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; @@ -22,6 +22,18 @@ import AskAddress from '../home/AskAddress'; import { stackNavigatorScreenOptions } from '../styles'; import AccountNavigator from './AccountNavigator'; +const MyOrderButton = ({ navigation }) => { + const color = useColorModeValue('black', 'white'); + + return ( + navigation()}> + {i18n.t('MY_ORDERS')} + + ); +}; + function getNestedOptions(navigation, route) { const routeName = getFocusedRouteNameFromRoute(route) ?? 'Feed'; @@ -36,13 +48,13 @@ function getNestedOptions(navigation, route) { headerRight: () => { if (selectIsAuthenticated(store.getState())) { return ( - { - navigation.navigate('AccountOrders'); - }}> - {i18n.t('MY_ORDERS')} - + <> + { + navigation.navigate('AccountOrders'); + }} + /> + ); } }, diff --git a/src/navigation/navigators/CourierNavigator.js b/src/navigation/navigators/CourierNavigator.js index 00e938974..1f7056bbb 100644 --- a/src/navigation/navigators/CourierNavigator.js +++ b/src/navigation/navigators/CourierNavigator.js @@ -1,6 +1,6 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { createStackNavigator } from '@react-navigation/stack'; -import { Icon } from 'native-base'; +import { Icon, useColorModeValue } from 'native-base'; import React from 'react'; import { StyleSheet, TouchableOpacity, View } from 'react-native'; import FontAwesome from 'react-native-vector-icons/FontAwesome'; @@ -58,15 +58,28 @@ const styles = StyleSheet.create({ }); const ButtonWithIcon = ({ name, onPress }) => { + const color = useColorModeValue('black', 'white'); return ( - + ); }; const MainStack = createStackNavigator(); +const headerButtons = nav => ( + + nav.navigate('CourierSettings')} + /> + + + + +); + const MainNavigator = () => ( ( options={({ navigation }) => ({ title: i18n.t('COURIER'), headerLeft: headerLeft(navigation, 'menuBtnCourier'), - headerRight: () => ( - - navigation.navigate('CourierSettings')} - /> - - - - - ), + headerRight: () => headerButtons(navigation), })} />