ordering-ui-react-native 0.17.24 → 0.17.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.17.24",
3
+ "version": "0.17.25",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -10,6 +10,7 @@ import {
10
10
  useConfig
11
11
  } from 'ordering-components/native';
12
12
  import { useTheme } from 'styled-components/native';
13
+ import { showLocation } from 'react-native-map-link';
13
14
  import {
14
15
  OrderDetailsContainer,
15
16
  Header,
@@ -116,6 +117,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
116
117
  const { order, businessData } = props.order;
117
118
  const mapValidStatuses = [9, 19, 23]
118
119
  const placeSpotTypes = [3, 4, 5]
120
+ const directionTypes = [2, 3, 4, 5]
119
121
 
120
122
  const walletName: any = {
121
123
  cash: {
@@ -743,6 +745,26 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
743
745
  {order?.business?.address}
744
746
  </OText>
745
747
  </View>
748
+ {directionTypes.includes(order?.delivery_type) && (
749
+ <OButton
750
+ text={t('GET_DIRECTIONS', 'Get Directions')}
751
+ imgRightSrc=''
752
+ textStyle={{ color: theme.colors.white }}
753
+ style={{
754
+ alignSelf: 'center',
755
+ borderRadius: 10,
756
+ marginTop: 30
757
+ }}
758
+ onClick={() => showLocation({
759
+ latitude: order?.business?.location?.lat,
760
+ longitude: order?.business?.location?.lng,
761
+ naverCallerName: 'com.reactnativeappstemplate5',
762
+ dialogTitle: t('GET_DIRECTIONS', 'Get Directions'),
763
+ dialogMessage: t('WHAT_APP_WOULD_YOU_USE', 'What app would you like to use?'),
764
+ cancelText: t('CANCEL', 'Cancel'),
765
+ })}
766
+ />
767
+ )}
746
768
  </OrderBusiness>
747
769
 
748
770
  {placeSpotTypes.includes(order?.delivery_type) && (