ordering-ui-react-native 0.21.62 → 0.21.64
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/original/src/components/BusinessController/index.tsx +3 -3
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/Cart/index.tsx +10 -2
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
76
76
|
const hideBusinessFavoriteBadge = theme?.business_listing_view?.components?.business?.components?.featured_badge?.hidden
|
|
77
77
|
|
|
78
78
|
const textSize = 12
|
|
79
|
-
const cardHeight = windowHeight * 0.
|
|
79
|
+
const cardHeight = windowHeight * 0.34
|
|
80
80
|
|
|
81
81
|
const styles = StyleSheet.create({
|
|
82
82
|
container: {
|
|
@@ -256,7 +256,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
256
256
|
</BusinessState>
|
|
257
257
|
</BusinessHero>
|
|
258
258
|
<BusinessContent>
|
|
259
|
-
<BusinessInfo style={{ position: 'absolute',
|
|
259
|
+
<BusinessInfo style={{ position: 'absolute', top: -26, left: 15 }}>
|
|
260
260
|
{!hideBusinessLogo && (
|
|
261
261
|
<BusinessLogo style={styles.businessLogo}>
|
|
262
262
|
<FastImage
|
|
@@ -304,7 +304,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
304
304
|
</ReviewAndFavorite>
|
|
305
305
|
)}
|
|
306
306
|
</View>
|
|
307
|
-
<OText size={textSize} style={{ lineHeight: 15, marginBottom: 3 }} numberOfLines={
|
|
307
|
+
<OText size={textSize} style={{ lineHeight: 15, marginBottom: 3 }} numberOfLines={2}>
|
|
308
308
|
{business?.address}
|
|
309
309
|
</OText>
|
|
310
310
|
<Metadata>
|
|
@@ -8,13 +8,14 @@ export const BusinessHero = styled.View`
|
|
|
8
8
|
`
|
|
9
9
|
|
|
10
10
|
export const BusinessContent = styled.View`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
position: relative;
|
|
12
|
+
padding-horizontal: 18px;
|
|
13
|
+
padding-bottom: 10px;
|
|
14
|
+
border-bottom-left-radius: 7.6px;
|
|
15
|
+
border-bottom-right-radius: 7.6px;
|
|
16
|
+
border-width: 1px;
|
|
17
|
+
border-color: ${(props: any) => props.theme.colors.border};
|
|
18
|
+
overflow: visible;
|
|
18
19
|
`;
|
|
19
20
|
|
|
20
21
|
export const BusinessInfo = styled.View`
|
|
@@ -196,6 +196,14 @@ const CartUI = (props: any) => {
|
|
|
196
196
|
return acc = acc
|
|
197
197
|
}, cart?.subtotal)
|
|
198
198
|
|
|
199
|
+
const handleClickCheckout = () => {
|
|
200
|
+
if (cart?.business_id) {
|
|
201
|
+
setOpenUpselling(true)
|
|
202
|
+
} else {
|
|
203
|
+
handleUpsellingPage(cart)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
199
207
|
useEffect(() => {
|
|
200
208
|
const limitDays = parseInt(preorderMaximumDays ?? configs?.max_days_preorder?.value, 10)
|
|
201
209
|
const currentDate = new Date()
|
|
@@ -232,7 +240,7 @@ const CartUI = (props: any) => {
|
|
|
232
240
|
handleCartOpen={handleCartOpen}
|
|
233
241
|
onNavigationRedirect={props.onNavigationRedirect}
|
|
234
242
|
handleChangeStore={() => setOpenChangeStore(true)}
|
|
235
|
-
handleClickCheckout={() =>
|
|
243
|
+
handleClickCheckout={() => handleClickCheckout()}
|
|
236
244
|
checkoutButtonDisabled={(openUpselling && !canOpenUpselling) || subtotalWithTaxes < cart?.minimum || !cart?.valid_address}
|
|
237
245
|
isMultiCheckout={isMultiCheckout}
|
|
238
246
|
isFromUpselling={isFromUpselling}
|
|
@@ -549,7 +557,7 @@ const CartUI = (props: any) => {
|
|
|
549
557
|
borderColor={theme.colors.primary}
|
|
550
558
|
imgRightSrc={null}
|
|
551
559
|
textStyle={{ color: '#fff', textAlign: 'center', flex: 1 }}
|
|
552
|
-
onClick={() =>
|
|
560
|
+
onClick={() => handleClickCheckout()}
|
|
553
561
|
style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
|
|
554
562
|
/>
|
|
555
563
|
</CheckoutAction>
|
|
@@ -56,7 +56,7 @@ const HighestRatedBusinessesUI = (props: HighestRatedBusinessesParams) => {
|
|
|
56
56
|
showsHorizontalScrollIndicator={false}
|
|
57
57
|
nestedScrollEnabled
|
|
58
58
|
horizontal
|
|
59
|
-
style={{ height:
|
|
59
|
+
style={{ height: 325, paddingHorizontal: 20 }}
|
|
60
60
|
>
|
|
61
61
|
{[
|
|
62
62
|
...Array(10).keys()
|
|
@@ -40,19 +40,19 @@ export const Otp = (props: otpParams) => {
|
|
|
40
40
|
onSubmit()
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const handleChangeCode = (code
|
|
43
|
+
const handleChangeCode = (code: string) => {
|
|
44
44
|
if (code?.length === pinCount) {
|
|
45
|
-
setCheckingCode(true)
|
|
45
|
+
setCheckingCode && setCheckingCode(true)
|
|
46
46
|
handleLoginOtp(code)
|
|
47
47
|
inputRef.current?.reset && inputRef.current.reset()
|
|
48
48
|
setTimeout(() => inputRef.current?.focus && inputRef.current.focus(), 100)
|
|
49
49
|
}
|
|
50
|
-
setOtpError(null)
|
|
50
|
+
setOtpError && setOtpError(null)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const handleCloseOtp = () => {
|
|
54
54
|
setWillVerifyOtpState(false)
|
|
55
|
-
setOtpError(null)
|
|
55
|
+
setOtpError && setOtpError(null)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
useEffect(() => {
|
|
@@ -108,18 +108,6 @@ export const Otp = (props: otpParams) => {
|
|
|
108
108
|
return (
|
|
109
109
|
<SafeAreaView style={{ flex: 1, backgroundColor: theme.colors.backgroundPage }}>
|
|
110
110
|
<OTPContainer>
|
|
111
|
-
<View
|
|
112
|
-
style={loginStyle.closeContainer}>
|
|
113
|
-
<TouchableOpacity onPress={() => handleCloseOtp()} style={loginStyle.wrapperIcon}>
|
|
114
|
-
<OIcon
|
|
115
|
-
src={theme.images.general.close}
|
|
116
|
-
width={22}
|
|
117
|
-
/>
|
|
118
|
-
</TouchableOpacity>
|
|
119
|
-
<OText size={22}>
|
|
120
|
-
{t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
|
|
121
|
-
</OText>
|
|
122
|
-
</View>
|
|
123
111
|
<OText size={24}>
|
|
124
112
|
{formatSeconds(otpLeftTime)}
|
|
125
113
|
</OText>
|