ordering-ui-react-native 0.22.75 → 0.22.77
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 +1 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +1 -1
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +7 -2
- package/themes/original/src/components/Cart/index.tsx +1 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +7 -2
package/package.json
CHANGED
|
@@ -546,7 +546,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
546
546
|
</View>
|
|
547
547
|
)}
|
|
548
548
|
{!((!order || Object.keys(order).length === 0) &&
|
|
549
|
-
(props.order?.error?.length < 1 || !props.order?.error)) && (
|
|
549
|
+
(props.order?.error?.length < 1 || !props.order?.error)) && order?.id && (
|
|
550
550
|
<View style={{ flex: 1 }}>
|
|
551
551
|
<OrderHeaderComponent
|
|
552
552
|
order={order}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import { TouchableOpacity, View, Vibration } from 'react-native';
|
|
3
3
|
import { useOrder, useLanguage, useUtils, useConfig, useEvent } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
import {
|
|
@@ -69,6 +69,11 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
69
69
|
}
|
|
70
70
|
}, [isActive, viewedCart])
|
|
71
71
|
|
|
72
|
+
const handleGoToStore = () => {
|
|
73
|
+
Vibration.vibrate(100)
|
|
74
|
+
props.onNavigationRedirect('Business', { store: cart?.business?.slug })
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
return (
|
|
73
78
|
<BIContainer isClosed={isClosed} isMultiCheckout={isMultiCheckout} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
|
|
74
79
|
<BIHeader
|
|
@@ -82,7 +87,7 @@ export const BusinessItemAccordion = (props: any) => {
|
|
|
82
87
|
<View style={{ flexDirection: 'row' }}>
|
|
83
88
|
{props.onNavigationRedirect && !isClosed && !isGiftCart && (
|
|
84
89
|
<>
|
|
85
|
-
<TouchableOpacity onPress={() =>
|
|
90
|
+
<TouchableOpacity onPress={() => handleGoToStore()}>
|
|
86
91
|
<OText color={theme.colors.primary} size={12} lineHeight={18} style={{ textDecorationLine: 'underline' }}>{t('GO_TO_STORE', 'Go to store')}</OText>
|
|
87
92
|
</TouchableOpacity>
|
|
88
93
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { Platform, StyleSheet, View } from 'react-native'
|
|
2
|
+
import { Platform, StyleSheet, View, Vibration } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
useLanguage,
|
|
5
5
|
useOrder,
|
|
@@ -90,6 +90,11 @@ export const UpsellingContent = (props: any) => {
|
|
|
90
90
|
setShowTitle(contentOffset.y > 30)
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
const handleClickCheckout = () => {
|
|
94
|
+
Vibration.vibrate(100)
|
|
95
|
+
handleUpsellingPage(cart)
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
return (
|
|
94
99
|
<>
|
|
95
100
|
<View style={styles.wrapperNavbar}>
|
|
@@ -160,7 +165,7 @@ export const UpsellingContent = (props: any) => {
|
|
|
160
165
|
text={t('CHECKOUT', 'Checkout')}
|
|
161
166
|
textStyle={{ fontSize: 14 }}
|
|
162
167
|
style={{ ...styles.closeUpsellingButton }}
|
|
163
|
-
onClick={() =>
|
|
168
|
+
onClick={() => handleClickCheckout()}
|
|
164
169
|
/>
|
|
165
170
|
</View>
|
|
166
171
|
</>
|