ordering-ui-react-native 0.22.47 → 0.22.48-release
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 +6 -8
- package/src/DeliveryApp.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +40 -39
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/context/OfflineActions/index.tsx +236 -0
- package/src/providers/AlertProvider.tsx +3 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -6
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/BusinessController/index.tsx +8 -3
- package/themes/business/src/components/BusinessProductList/index.tsx +3 -2
- package/themes/business/src/components/Chat/index.tsx +15 -3
- package/themes/business/src/components/DriverMap/index.tsx +44 -33
- package/themes/business/src/components/FloatingButton/index.tsx +3 -2
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -1
- package/themes/business/src/components/LoginForm/index.tsx +123 -98
- package/themes/business/src/components/LogoutButton/index.tsx +13 -4
- package/themes/business/src/components/MapView/index.tsx +42 -22
- package/themes/business/src/components/NewOrderNotification/index.tsx +38 -19
- package/themes/business/src/components/OrderDetails/Business.tsx +88 -20
- package/themes/business/src/components/OrderDetails/Delivery.tsx +134 -53
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +155 -45
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +51 -28
- package/themes/business/src/components/OrderDetails/styles.tsx +39 -3
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +17 -16
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +3 -2
- package/themes/business/src/components/OrderSummary/index.tsx +271 -176
- package/themes/business/src/components/OrdersListManager/index.tsx +13 -1
- package/themes/business/src/components/OrdersOption/index.tsx +332 -231
- package/themes/business/src/components/OrdersOption/styles.tsx +14 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +26 -3
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +30 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +74 -66
- package/themes/business/src/components/PreviousOrders/styles.tsx +2 -1
- package/themes/business/src/components/PrinterEdition/MessageAlert.tsx +33 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +143 -75
- package/themes/business/src/components/PrinterEdition/printerList.tsx +23 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +1 -1
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/StoresList/index.tsx +2 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +48 -10
- package/themes/business/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/components/shared/OTextarea.tsx +8 -9
- package/themes/business/src/config/currency.tsx +1010 -0
- package/themes/business/src/hooks/useLocation.tsx +16 -12
- package/themes/business/src/layouts/SafeAreaContainer.tsx +35 -19
- package/themes/business/src/types/index.tsx +22 -7
- package/themes/business/src/utils/index.tsx +28 -3
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +9 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +121 -57
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +9 -1
- package/themes/original/src/components/AddressForm/index.tsx +19 -19
- package/themes/original/src/components/AddressList/index.tsx +0 -13
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +14 -6
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +103 -92
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +8 -6
- package/themes/original/src/components/BusinessListingSearch/index.tsx +1 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +46 -28
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +73 -70
- package/themes/original/src/components/BusinessProductsList/index.tsx +6 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +10 -6
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +9 -8
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +49 -15
- package/themes/original/src/components/CartContent/index.tsx +2 -4
- package/themes/original/src/components/Checkout/index.tsx +109 -88
- package/themes/original/src/components/CitiesControl/index.tsx +0 -3
- package/themes/original/src/components/CouponControl/index.tsx +1 -3
- package/themes/original/src/components/DriverTips/index.tsx +1 -3
- package/themes/original/src/components/Favorite/index.tsx +1 -10
- package/themes/original/src/components/FavoriteList/index.tsx +0 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -12
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +7 -9
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +11 -12
- package/themes/original/src/components/GoogleMap/index.tsx +39 -18
- package/themes/original/src/components/Help/index.tsx +0 -5
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -5
- package/themes/original/src/components/HelpGuide/index.tsx +0 -5
- package/themes/original/src/components/HelpOrder/index.tsx +0 -5
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +35 -19
- package/themes/original/src/components/LoginForm/Otp/index.tsx +0 -3
- package/themes/original/src/components/LoginForm/index.tsx +12 -14
- package/themes/original/src/components/MessageListing/index.tsx +1 -6
- package/themes/original/src/components/Messages/index.tsx +20 -13
- package/themes/original/src/components/MomentOption/TimeListItem.tsx +56 -0
- package/themes/original/src/components/MomentOption/index.tsx +73 -59
- package/themes/original/src/components/MomentSelector/index.tsx +5 -2
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -4
- package/themes/original/src/components/MultiCheckout/index.tsx +55 -27
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -0
- package/themes/original/src/components/MyOrders/index.tsx +2 -7
- package/themes/original/src/components/NavBar/index.tsx +7 -6
- package/themes/original/src/components/NetworkError/index.tsx +0 -5
- package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
- package/themes/original/src/components/Notifications/index.tsx +0 -5
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +4 -3
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +16 -11
- package/themes/original/src/components/OrderDetails/index.tsx +44 -21
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderProgress/index.tsx +4 -3
- package/themes/original/src/components/OrderSummary/index.tsx +32 -11
- package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -11
- package/themes/original/src/components/OrdersOption/index.tsx +3 -6
- package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +462 -461
- package/themes/original/src/components/PhoneInputNumber/index.tsx +92 -7
- package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
- package/themes/original/src/components/PreviousOrders/index.tsx +1 -4
- package/themes/original/src/components/ProductForm/ActionButton.tsx +7 -12
- package/themes/original/src/components/ProductItemAccordion/index.tsx +28 -37
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
- package/themes/original/src/components/Promotions/index.tsx +2 -7
- package/themes/original/src/components/ReviewDriver/index.tsx +1 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +2 -7
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -6
- package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/index.tsx +52 -54
- package/themes/original/src/components/Sessions/index.tsx +3 -8
- package/themes/original/src/components/SignupForm/index.tsx +44 -37
- package/themes/original/src/components/SingleOrderCard/index.tsx +7 -5
- package/themes/original/src/components/SingleProductCard/index.tsx +3 -4
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +16 -3
- package/themes/original/src/components/StripeElementsForm/index.tsx +8 -4
- package/themes/original/src/components/StripeElementsForm/naked.tsx +1 -1
- package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
- package/themes/original/src/components/TaxInformation/index.tsx +3 -2
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +8 -5
- package/themes/original/src/components/UserDetails/index.tsx +17 -16
- package/themes/original/src/components/UserFormDetails/index.tsx +113 -73
- package/themes/original/src/components/UserProfile/index.tsx +9 -1
- package/themes/original/src/components/UserProfileForm/index.tsx +0 -5
- package/themes/original/src/components/UserVerification/index.tsx +18 -5
- package/themes/original/src/components/Wallets/index.tsx +1 -3
- package/themes/original/src/components/WebsocketStatus/index.tsx +1 -4
- package/themes/original/src/components/shared/OAlert.tsx +2 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -4
- package/themes/original/src/components/shared/OInput.tsx +4 -8
- package/themes/original/src/components/shared/OModal.tsx +7 -2
- package/themes/original/src/types/index.tsx +12 -4
- package/themes/original/src/utils/index.tsx +29 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -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}>
|
|
@@ -158,11 +163,9 @@ export const UpsellingContent = (props: any) => {
|
|
|
158
163
|
<OButton
|
|
159
164
|
imgRightSrc=''
|
|
160
165
|
text={t('CHECKOUT', 'Checkout')}
|
|
161
|
-
textStyle={{
|
|
162
|
-
bgColor={theme.colors.primary}
|
|
163
|
-
borderColor={theme.colors.primary}
|
|
166
|
+
textStyle={{ fontSize: 14 }}
|
|
164
167
|
style={{ ...styles.closeUpsellingButton }}
|
|
165
|
-
onClick={() =>
|
|
168
|
+
onClick={() => handleClickCheckout()}
|
|
166
169
|
/>
|
|
167
170
|
</View>
|
|
168
171
|
</>
|
|
@@ -35,7 +35,8 @@ const UserDetailsUI = (props: any) => {
|
|
|
35
35
|
handleSendVerifyCode,
|
|
36
36
|
verifyPhoneState,
|
|
37
37
|
setFormState,
|
|
38
|
-
setIsOpen
|
|
38
|
+
setIsOpen,
|
|
39
|
+
isCheckoutPlace
|
|
39
40
|
} = props
|
|
40
41
|
|
|
41
42
|
const theme = useTheme();
|
|
@@ -95,23 +96,23 @@ const UserDetailsUI = (props: any) => {
|
|
|
95
96
|
},
|
|
96
97
|
});
|
|
97
98
|
handleSendVerifyCode({
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
cellphone: cellphone,
|
|
100
|
+
country_phone_code: countryPhoneCode
|
|
100
101
|
})
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const handleSendPhoneCode = (values: any) => {
|
|
105
|
-
|
|
106
|
+
setWillVerifyOtpState(false)
|
|
106
107
|
setIsModalVisible(false)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
setFormState({
|
|
109
|
+
...formState,
|
|
110
|
+
changes: {
|
|
111
|
+
...formState?.changes,
|
|
112
|
+
verification_code: values?.code
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
}
|
|
115
116
|
|
|
116
117
|
useEffect(() => {
|
|
117
118
|
if (willVerifyOtpState) handleVerifyCodeClick()
|
|
@@ -158,7 +159,7 @@ const UserDetailsUI = (props: any) => {
|
|
|
158
159
|
{t('CUSTOMER_DETAILS', 'Customer Details')}
|
|
159
160
|
</OText>
|
|
160
161
|
)}
|
|
161
|
-
{cartStatus !== 2 && !
|
|
162
|
+
{cartStatus !== 2 && !isCheckoutPlace && (
|
|
162
163
|
!isEdit ? (
|
|
163
164
|
<EditBtn onPress={() => toggleIsEdit()} activeOpacity={0.7}>
|
|
164
165
|
<OIcon
|
|
@@ -189,12 +190,12 @@ const UserDetailsUI = (props: any) => {
|
|
|
189
190
|
{userData?.name} {userData?.middle_name} {userData?.lastname} {userData?.second_lastname}
|
|
190
191
|
</OText>
|
|
191
192
|
<OText size={12} lineHeight={18} weight={'400'}>
|
|
192
|
-
{userData?.email}
|
|
193
|
+
{userData?.guest_id ? userData?.guest_email : userData?.email}
|
|
193
194
|
</OText>
|
|
194
|
-
{!!(userData?.cellphone || user?.cellphone) && (
|
|
195
|
+
{!!((userData?.cellphone ?? userData?.guest_cellphone) || (user?.cellphone ?? user?.guest_cellphone)) && (
|
|
195
196
|
<>
|
|
196
197
|
<OText size={12} lineHeight={18} weight={'400'}>
|
|
197
|
-
{(userData?.country_phone_code) && `+${(userData?.country_phone_code)} `}{(userData?.cellphone)}
|
|
198
|
+
{(userData?.country_phone_code) && `+${(userData?.country_phone_code)} `}{(userData?.guest_id ? user?.guest_cellphone : userData?.cellphone)}
|
|
198
199
|
</OText>
|
|
199
200
|
{!!phoneUpdate && (
|
|
200
201
|
<OText color={theme.colors.error} style={{ textAlign: 'center' }}>{t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number')}</OText>
|
|
@@ -16,6 +16,8 @@ import { ListItem } from '../UserProfile/styles';
|
|
|
16
16
|
import moment from 'moment';
|
|
17
17
|
import { DatePickerUI } from '../DatePicker';
|
|
18
18
|
|
|
19
|
+
const CONDITIONAL_CODES = ['PR']
|
|
20
|
+
|
|
19
21
|
export const UserFormDetailsUI = (props: any) => {
|
|
20
22
|
const {
|
|
21
23
|
isEdit,
|
|
@@ -36,7 +38,15 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
36
38
|
isCheckout,
|
|
37
39
|
setIsOpen,
|
|
38
40
|
handleRemoveAccount,
|
|
39
|
-
isProfile
|
|
41
|
+
isProfile,
|
|
42
|
+
isGuest,
|
|
43
|
+
isOrderTypeValidationField,
|
|
44
|
+
checkoutFields,
|
|
45
|
+
isCheckoutPlace,
|
|
46
|
+
setCellphoneStartZero,
|
|
47
|
+
setPhoneState,
|
|
48
|
+
isPhoneVerifyRequired,
|
|
49
|
+
cellphoneOtpSent
|
|
40
50
|
} = props;
|
|
41
51
|
|
|
42
52
|
const theme = useTheme();
|
|
@@ -78,7 +88,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
78
88
|
const [, { showToast }] = useToast();
|
|
79
89
|
const { handleSubmit, control, errors, setValue } = useForm();
|
|
80
90
|
|
|
81
|
-
const [{ user }, { login }] = useSession();
|
|
91
|
+
const [{ user }, { login, logout }] = useSession();
|
|
82
92
|
const [userPhoneNumber, setUserPhoneNumber] = useState<any>(null);
|
|
83
93
|
const [isValid, setIsValid] = useState(false)
|
|
84
94
|
const [isChanged, setIsChanged] = useState(false)
|
|
@@ -95,8 +105,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
95
105
|
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
96
106
|
|
|
97
107
|
const isAdmin = user?.level === 0
|
|
98
|
-
const showInputPhoneNumber = (validationFields?.fields?.checkout?.cellphone?.enabled ?? false)
|
|
99
|
-
const showInputBirthday = validationFields?.fields?.checkout?.birthdate?.enabled ?? false
|
|
108
|
+
const showInputPhoneNumber = isOrderTypeValidationField ? checkoutFields?.find(field => field?.validation_field?.code === 'mobile_phone')?.enabled : (validationFields?.fields?.checkout?.cellphone?.enabled ?? false)
|
|
109
|
+
const showInputBirthday = isOrderTypeValidationField ? checkoutFields?.find(field => field?.validation_field?.code === 'birthdate')?.enabled : (validationFields?.fields?.checkout?.birthdate?.enabled ?? false)
|
|
100
110
|
|
|
101
111
|
const handleSuccessSignup = (user: any) => {
|
|
102
112
|
login({
|
|
@@ -127,15 +137,27 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
127
137
|
return rules;
|
|
128
138
|
};
|
|
129
139
|
|
|
140
|
+
const cellphoneValue = () => {
|
|
141
|
+
let cellphone = user?.guest_id ? user?.guest_cellphone : user?.cellphone
|
|
142
|
+
if (cellphone && CONDITIONAL_CODES.includes(user?.country_code)) {
|
|
143
|
+
if (user?.country_code === 'PR') {
|
|
144
|
+
cellphone = user?.cellphone?.slice(3)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return cellphone
|
|
148
|
+
}
|
|
149
|
+
|
|
130
150
|
const setUserCellPhone = (isEdit = false) => {
|
|
131
151
|
if (userPhoneNumber && !userPhoneNumber.includes('null') && !isEdit) {
|
|
132
152
|
setUserPhoneNumber(userPhoneNumber);
|
|
133
153
|
return;
|
|
134
154
|
}
|
|
135
|
-
|
|
155
|
+
const cellphone = user?.guest_id ? user?.guest_cellphone : user?.cellphone
|
|
156
|
+
|
|
157
|
+
if (cellphone) {
|
|
136
158
|
let phone = null;
|
|
137
159
|
if (user?.country_phone_code) {
|
|
138
|
-
phone = `+${user?.country_phone_code} ${
|
|
160
|
+
phone = `+${user?.country_phone_code} ${cellphone}`;
|
|
139
161
|
} else {
|
|
140
162
|
phone = user?.cellphone;
|
|
141
163
|
}
|
|
@@ -144,17 +166,22 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
144
166
|
...phoneInputData,
|
|
145
167
|
phone: {
|
|
146
168
|
country_phone_code: user?.country_phone_code || null,
|
|
147
|
-
cellphone:
|
|
169
|
+
cellphone: cellphoneValue()
|
|
148
170
|
},
|
|
149
171
|
});
|
|
150
172
|
return;
|
|
151
173
|
}
|
|
152
|
-
setUserPhoneNumber(
|
|
174
|
+
setUserPhoneNumber(cellphone || '');
|
|
153
175
|
};
|
|
154
176
|
|
|
155
177
|
const onSubmit = () => {
|
|
178
|
+
let content = ''
|
|
179
|
+
if (requiredFields?.includes?.('birthdate') && !birthdate) {
|
|
180
|
+
content = content + `${t('VALIDATION_ERROR_BIRTHDATE_REQUIRED', 'Birthdate is required')}\n`
|
|
181
|
+
}
|
|
156
182
|
if (phoneInputData.error) {
|
|
157
|
-
|
|
183
|
+
content = content + `${phoneInputData.error}\n`
|
|
184
|
+
showToast(ToastType.Error, content);
|
|
158
185
|
return;
|
|
159
186
|
}
|
|
160
187
|
if (Object.keys(formState.changes).length > 0) {
|
|
@@ -162,17 +189,16 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
162
189
|
formState.changes?.cellphone === null &&
|
|
163
190
|
((validationFields?.fields?.checkout?.cellphone?.enabled &&
|
|
164
191
|
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
165
|
-
configs?.verification_phone_required?.value === '1')
|
|
192
|
+
(configs?.verification_phone_required?.value === '1' && !user?.guest_id))
|
|
166
193
|
) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
t(
|
|
170
|
-
'VALIDATION_ERROR_MOBILE_PHONE_REQUIRED',
|
|
171
|
-
'The field Phone Number is required.',
|
|
172
|
-
),
|
|
173
|
-
);
|
|
194
|
+
content = content + `${t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone Number is required.',)}\n`
|
|
195
|
+
showToast(ToastType.Error, content);
|
|
174
196
|
return;
|
|
175
197
|
}
|
|
198
|
+
if (content.length > 0) {
|
|
199
|
+
showToast(ToastType.Error, content);
|
|
200
|
+
return
|
|
201
|
+
}
|
|
176
202
|
let changes = null;
|
|
177
203
|
if (user?.cellphone && !userPhoneNumber) {
|
|
178
204
|
changes = {
|
|
@@ -185,7 +211,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
185
211
|
}
|
|
186
212
|
};
|
|
187
213
|
|
|
188
|
-
const handleChangePhoneNumber = (number: any) => {
|
|
214
|
+
const handleChangePhoneNumber = (number: any, rawNumber : any) => {
|
|
189
215
|
setPhoneInputData(number);
|
|
190
216
|
setIsChanged(true)
|
|
191
217
|
let phoneNumber = {
|
|
@@ -198,6 +224,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
198
224
|
value: number.phone.cellphone,
|
|
199
225
|
},
|
|
200
226
|
};
|
|
227
|
+
setCellphoneStartZero && setCellphoneStartZero(rawNumber?.number && rawNumber?.countryCallingCode ? rawNumber?.number : null)
|
|
201
228
|
handleChangeInput(phoneNumber, true);
|
|
202
229
|
};
|
|
203
230
|
|
|
@@ -223,9 +250,12 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
223
250
|
open: true,
|
|
224
251
|
content: [t('QUESTION_REMOVE_ACCOUNT', 'Are you sure that you want to remove your account?')],
|
|
225
252
|
title: t('ACCOUNT_ALERT', 'Account alert'),
|
|
226
|
-
handleOnAccept: () => {
|
|
253
|
+
handleOnAccept: async () => {
|
|
227
254
|
setConfirm({ ...confirm, open: false })
|
|
228
|
-
|
|
255
|
+
const response = await handleRemoveAccount?.(user?.id)
|
|
256
|
+
if (response === 'OK'){
|
|
257
|
+
logout()
|
|
258
|
+
}
|
|
229
259
|
}
|
|
230
260
|
})
|
|
231
261
|
}
|
|
@@ -294,20 +324,29 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
294
324
|
setIsValid(_isValid)
|
|
295
325
|
}, [formState?.changes, requiredFields])
|
|
296
326
|
|
|
327
|
+
useEffect(() => {
|
|
328
|
+
if (!isPhoneVerifyRequired || cellphoneOtpSent || formState?.changes?.length === 0) return
|
|
329
|
+
setPhoneState?.({
|
|
330
|
+
cellphone: formState?.changes?.country_code === "PR" ? formState?.changes?.cellphone.replace('787', '') : formState?.changes?.cellphone,
|
|
331
|
+
country_phone_code: formState?.changes?.country_code === "PR" ? '1787' : formState?.changes?.country_phone_code,
|
|
332
|
+
formatted: `+${formState?.changes?.country_phone_code} ${formState?.changes?.cellphone}`
|
|
333
|
+
})
|
|
334
|
+
}, [formState?.changes, cellphoneOtpSent])
|
|
335
|
+
|
|
297
336
|
return (
|
|
298
337
|
<>
|
|
299
338
|
<UDForm>
|
|
300
339
|
{!validationFields?.loading &&
|
|
301
|
-
sortInputFields({ values: validationFields?.fields?.checkout })
|
|
340
|
+
sortInputFields({ values: isOrderTypeValidationField ? checkoutFields : validationFields?.fields?.checkout })
|
|
302
341
|
.length > 0 && (
|
|
303
342
|
<UDWrapper>
|
|
304
343
|
{sortInputFields({
|
|
305
|
-
values: validationFields
|
|
344
|
+
values: isOrderTypeValidationField ? checkoutFields : validationFields?.fields?.checkout,
|
|
306
345
|
}).map(
|
|
307
346
|
(item: any) => {
|
|
308
347
|
const field = item?.validation_field || item
|
|
309
|
-
return (
|
|
310
|
-
showField(field.code) && ((requiredFields && requiredFields?.includes?.(field.code)) || !requiredFields) && (
|
|
348
|
+
return (
|
|
349
|
+
((isOrderTypeValidationField ? item?.enabled : (showField && showField(field.code))) && ((requiredFields && requiredFields?.includes?.(field.code)) || !requiredFields || !isCheckoutPlace)) && (
|
|
311
350
|
<React.Fragment key={field.id}>
|
|
312
351
|
<Controller
|
|
313
352
|
key={field.id}
|
|
@@ -331,7 +370,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
331
370
|
isDisabled={false}
|
|
332
371
|
value={
|
|
333
372
|
formState?.changes[field.code] ??
|
|
334
|
-
(user && user[field.code]) ??
|
|
373
|
+
(user && user?.guest_id && field.code === 'email' ? user?.guest_email : user?.[field.code]) ??
|
|
335
374
|
''
|
|
336
375
|
}
|
|
337
376
|
onChange={(val: any) => {
|
|
@@ -375,52 +414,58 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
375
414
|
)}
|
|
376
415
|
name={field.code}
|
|
377
416
|
rules={getInputRules(field)}
|
|
378
|
-
defaultValue={user && user[field.code]}
|
|
417
|
+
defaultValue={user && (field.code === 'email' && user?.guest_id ? user?.guest_email : user?.[field.code])}
|
|
379
418
|
/>
|
|
380
419
|
</React.Fragment>
|
|
381
420
|
))
|
|
382
421
|
},
|
|
383
422
|
)}
|
|
384
|
-
{
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
{birthdate ? moment(birthdate).format('YYYY-MM-DD') : ''}
|
|
423
|
+
{((!user?.guest_id && showInputBirthday) || (isOrderTypeValidationField || user?.guest_id)) &&
|
|
424
|
+
showInputBirthday &&
|
|
425
|
+
((requiredFields && requiredFields?.includes?.('birthdate')) || !requiredFields || !isCheckoutPlace) &&
|
|
426
|
+
(
|
|
427
|
+
<>
|
|
428
|
+
<WrapperBirthdate>
|
|
429
|
+
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ textTransform: 'capitalize', alignSelf: 'flex-start' }}>
|
|
430
|
+
{t('BIRTHDATE', 'Birthdate')}
|
|
393
431
|
</OText>
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
432
|
+
<TouchableOpacity onPress={() => setShowDatePicker(!showDatePicker)}>
|
|
433
|
+
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ marginTop: 6 }}>
|
|
434
|
+
{birthdate ? moment(birthdate).format('YYYY-MM-DD') : ''}
|
|
435
|
+
</OText>
|
|
436
|
+
</TouchableOpacity>
|
|
437
|
+
</WrapperBirthdate>
|
|
438
|
+
<DatePickerUI open={showDatePicker} birthdate={birthdate} onConfirm={_handleChangeDate} onCancel={() => setShowDatePicker(false)} />
|
|
439
|
+
</>
|
|
440
|
+
)}
|
|
441
|
+
{((!user?.guest_id && !!showInputPhoneNumber) || (isOrderTypeValidationField || user?.guest_id)) &&
|
|
442
|
+
((requiredFields && requiredFields?.includes?.('cellphone')) || !requiredFields || !isCheckoutPlace) &&
|
|
443
|
+
(
|
|
444
|
+
<WrapperPhone>
|
|
445
|
+
<OText size={14} lineHeight={21} weight={'500'} color={theme.colors.textNormal}>{t('PHONE', 'Phone')}</OText>
|
|
446
|
+
<PhoneInputNumber
|
|
447
|
+
data={phoneInputData}
|
|
448
|
+
handleData={handleChangePhoneNumber}
|
|
449
|
+
changeCountry={(val: any) => changeCountry(val)}
|
|
450
|
+
defaultValue={phoneUpdate ? '' : cellphoneValue()}
|
|
451
|
+
defaultCode={user?.country_code ?? user?.country_phone_code ?? null}
|
|
452
|
+
defaultCodeFallback={user?.country_phone_code}
|
|
453
|
+
boxStyle={styles.phoneSelect}
|
|
454
|
+
inputStyle={styles.phoneInputStyle}
|
|
455
|
+
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
456
|
+
noDropIcon
|
|
457
|
+
/>
|
|
458
|
+
{phoneUpdate && (
|
|
459
|
+
<OText
|
|
460
|
+
size={10}
|
|
461
|
+
color={theme.colors.error}
|
|
462
|
+
style={{ marginHorizontal: 10, textAlign: 'center' }}>
|
|
463
|
+
{t('YOUR_PREVIOUS_CELLPHONE', 'Your previous cellphone')}:{' '}
|
|
464
|
+
{cellphoneValue()}
|
|
465
|
+
</OText>
|
|
466
|
+
)}
|
|
467
|
+
</WrapperPhone>
|
|
468
|
+
)}
|
|
424
469
|
{!requiredFields && (
|
|
425
470
|
<Controller
|
|
426
471
|
control={control}
|
|
@@ -472,7 +517,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
472
517
|
</UDLoader>
|
|
473
518
|
)}
|
|
474
519
|
</UDForm>
|
|
475
|
-
{!hideUpdateButton && (
|
|
520
|
+
{!hideUpdateButton && !isPhoneVerifyRequired && (
|
|
476
521
|
<>
|
|
477
522
|
{((formState &&
|
|
478
523
|
Object.keys(formState?.changes).length > 0 &&
|
|
@@ -484,9 +529,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
484
529
|
? t('UPDATING', 'Updating...')
|
|
485
530
|
: t('UPDATE', 'Update')
|
|
486
531
|
}
|
|
487
|
-
|
|
488
|
-
textStyle={{ color: theme.colors.white, fontSize: 14 }}
|
|
489
|
-
borderColor={theme.colors.primary}
|
|
532
|
+
textStyle={{ fontSize: 14 }}
|
|
490
533
|
isDisabled={formState.loading}
|
|
491
534
|
imgRightSrc={null}
|
|
492
535
|
style={{ borderRadius: 7.6, shadowOpacity: 0, width: '100%', borderWidth: 1, marginTop: 20, marginBottom: 20 }}
|
|
@@ -495,7 +538,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
495
538
|
)}
|
|
496
539
|
</>
|
|
497
540
|
)}
|
|
498
|
-
{
|
|
541
|
+
{isCheckoutPlace && (
|
|
499
542
|
<OButton
|
|
500
543
|
text={
|
|
501
544
|
formState.loading
|
|
@@ -504,12 +547,10 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
504
547
|
? t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')
|
|
505
548
|
: t('CONTINUE', 'Continue'))
|
|
506
549
|
}
|
|
507
|
-
bgColor={theme.colors.primary}
|
|
508
550
|
textStyle={{
|
|
509
551
|
color: !user?.guest_id && (formState.loading || !isValid) ? theme.colors.primary : theme.colors.white,
|
|
510
552
|
fontSize: 14
|
|
511
553
|
}}
|
|
512
|
-
borderColor={theme.colors.primary}
|
|
513
554
|
isDisabled={!user?.guest_id && (formState.loading || !isValid)}
|
|
514
555
|
imgRightSrc={null}
|
|
515
556
|
style={{
|
|
@@ -556,4 +597,3 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
556
597
|
</>
|
|
557
598
|
);
|
|
558
599
|
};
|
|
559
|
-
|
|
@@ -44,6 +44,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
44
44
|
handleRemoveAccount,
|
|
45
45
|
removeAccountState,
|
|
46
46
|
handleChangePromotions,
|
|
47
|
+
appVersion
|
|
47
48
|
} = props;
|
|
48
49
|
|
|
49
50
|
const theme = useTheme();
|
|
@@ -151,7 +152,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
151
152
|
const detailProps = {
|
|
152
153
|
goToBack: () => props.navigation?.canGoBack() && props.navigation.goBack(),
|
|
153
154
|
onNavigationRedirect: (route: string, params: any) => props.navigation.navigate(route, params),
|
|
154
|
-
handleRemoveAccount
|
|
155
|
+
handleRemoveAccount,
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
useEffect(() => {
|
|
@@ -271,6 +272,13 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
271
272
|
</Actions>
|
|
272
273
|
</ListWrap>
|
|
273
274
|
<WebsocketStatus />
|
|
275
|
+
{appVersion && (
|
|
276
|
+
<View
|
|
277
|
+
style={{ alignItems: 'center' }}
|
|
278
|
+
>
|
|
279
|
+
<OText>v{appVersion}</OText>
|
|
280
|
+
</View>
|
|
281
|
+
)}
|
|
274
282
|
<OAlert
|
|
275
283
|
open={confirm.open}
|
|
276
284
|
title={confirm.title}
|
|
@@ -287,11 +287,6 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
287
287
|
onActionLeft={() => navigation.goBack()}
|
|
288
288
|
showCall={false}
|
|
289
289
|
btnStyle={{ paddingLeft: 0 }}
|
|
290
|
-
buttonProps={{
|
|
291
|
-
bgColor: theme.colors.white,
|
|
292
|
-
borderColor: theme.colors.white,
|
|
293
|
-
textStyle: { color: theme.colors.btnFont }
|
|
294
|
-
}}
|
|
295
290
|
/>
|
|
296
291
|
<CenterView>
|
|
297
292
|
<View style={styles.photo}>
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
WrapperActions
|
|
38
38
|
} from './styles'
|
|
39
39
|
|
|
40
|
+
const CONDITIONAL_CODES = [1787]
|
|
40
41
|
const TIME_COUNTDOWN = 60 * 10 // 10 minutes
|
|
41
42
|
|
|
42
43
|
const UserDetails = (props: any) => {
|
|
@@ -176,9 +177,18 @@ const UserVerificationUI = (props: any) => {
|
|
|
176
177
|
setTimer(`${TIME_COUNTDOWN / 60}:00`)
|
|
177
178
|
setIsSendCodeAgain(true)
|
|
178
179
|
if (opt === 'phone') {
|
|
180
|
+
let cellphone = phoneState?.cellphone
|
|
181
|
+
let country_phone_code = phoneState?.country_phone_code
|
|
182
|
+
|
|
183
|
+
if (CONDITIONAL_CODES.includes(Number(country_phone_code))) {
|
|
184
|
+
if (Number(country_phone_code) === 1787) {
|
|
185
|
+
cellphone = `787${cellphone}`
|
|
186
|
+
country_phone_code = '1'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
179
189
|
sendVerifyPhoneCode({
|
|
180
|
-
cellphone
|
|
181
|
-
country_phone_code
|
|
190
|
+
cellphone,
|
|
191
|
+
country_phone_code
|
|
182
192
|
})
|
|
183
193
|
return
|
|
184
194
|
}
|
|
@@ -188,8 +198,8 @@ const UserVerificationUI = (props: any) => {
|
|
|
188
198
|
const setupUserPhoneNumber = () => {
|
|
189
199
|
if (!user || !user?.cellphone || !user?.country_phone_code) return
|
|
190
200
|
setPhoneState({
|
|
191
|
-
cellphone: user?.cellphone,
|
|
192
|
-
country_phone_code: user?.country_phone_code,
|
|
201
|
+
cellphone: user?.country_code === "PR" ? user?.cellphone.replace('787', '') : user?.cellphone,
|
|
202
|
+
country_phone_code: user?.country_code === "PR" ? '1787' : user?.country_phone_code,
|
|
193
203
|
formatted: `+${user?.country_phone_code} ${user?.cellphone}`
|
|
194
204
|
})
|
|
195
205
|
}
|
|
@@ -399,6 +409,7 @@ const UserVerificationUI = (props: any) => {
|
|
|
399
409
|
defaultCode={phoneState?.country_phone_code.replace('+', '')}
|
|
400
410
|
boxStyle={style.phoneSelect}
|
|
401
411
|
inputStyle={style.phoneInputStyle}
|
|
412
|
+
defaultCodeFallback={phoneState?.country_phone_code.replace('+', '')}
|
|
402
413
|
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
403
414
|
noDropIcon
|
|
404
415
|
isDisabled
|
|
@@ -485,7 +496,9 @@ const UserVerificationUI = (props: any) => {
|
|
|
485
496
|
<UserDetails
|
|
486
497
|
user={user}
|
|
487
498
|
isEdit
|
|
488
|
-
|
|
499
|
+
isPhoneVerifyRequired={isPhoneVerifyRequired}
|
|
500
|
+
cellphoneOtpSent={verificationState.phone}
|
|
501
|
+
setPhoneState={setPhoneState}
|
|
489
502
|
dontToggleEditMode
|
|
490
503
|
/>
|
|
491
504
|
</View>
|
|
@@ -309,13 +309,11 @@ const WalletsUI = (props: any) => {
|
|
|
309
309
|
borderWidth: 0,
|
|
310
310
|
width: 26,
|
|
311
311
|
height: 26,
|
|
312
|
-
backgroundColor: '#FFF',
|
|
313
|
-
borderColor: '#FFF',
|
|
314
|
-
shadowColor: '#FFF',
|
|
315
312
|
paddingLeft: 0,
|
|
316
313
|
paddingRight: 0,
|
|
317
314
|
marginBottom: 10
|
|
318
315
|
}}
|
|
316
|
+
useArrow
|
|
319
317
|
onClick={() => setOpenHistory(false)}
|
|
320
318
|
icon={AntDesignIcon}
|
|
321
319
|
iconProps={{
|
|
@@ -143,15 +143,12 @@ const SocketStatusUI = (props: any) => {
|
|
|
143
143
|
<OButton
|
|
144
144
|
onClick={() => setOpenModal(false)}
|
|
145
145
|
bgColor={theme.colors.white}
|
|
146
|
-
borderColor={theme.colors.primary}
|
|
147
146
|
textStyle={{ color: theme.colors.primary }}
|
|
148
147
|
style={{ borderRadius: 8, height: 48 }}
|
|
149
148
|
text={t('CLOSE', 'Close')}
|
|
150
149
|
/>
|
|
151
|
-
|
|
150
|
+
<OButton
|
|
152
151
|
onClick={() => RNRestart.Restart()}
|
|
153
|
-
borderColor={theme.colors.primary}
|
|
154
|
-
textStyle={{ color: theme.colors.white }}
|
|
155
152
|
style={{ borderRadius: 8, marginLeft: 16, height: 48 }}
|
|
156
153
|
text={t('UPDATE', 'Update')}
|
|
157
154
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import styled, { css } from 'styled-components/native'
|
|
3
|
-
import { Alert } from 'react-native'
|
|
3
|
+
import { Alert, Vibration } from 'react-native'
|
|
4
4
|
import { useLanguage } from 'ordering-components/native'
|
|
5
5
|
|
|
6
6
|
const Wrapper = styled.TouchableOpacity`
|
|
@@ -41,6 +41,7 @@ const OAlert = (props: Props) => {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const handleClick = () => {
|
|
44
|
+
Vibration.vibrate(100)
|
|
44
45
|
props.onClick && props.onClick()
|
|
45
46
|
createTwoButtonAlert()
|
|
46
47
|
}
|
|
@@ -85,6 +85,7 @@ interface Props {
|
|
|
85
85
|
isDisabledWithSameStyles?: boolean;
|
|
86
86
|
icon?: any;
|
|
87
87
|
iconProps?: any
|
|
88
|
+
useArrow?: boolean;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
const OButton = (props: Props): React.ReactElement => {
|
|
@@ -94,8 +95,8 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
94
95
|
if (props.isDisabled) {
|
|
95
96
|
return (
|
|
96
97
|
<View style={props.parentStyle}>
|
|
97
|
-
<StyledButtonDisabled style={props.style}>
|
|
98
|
-
<StyledTextDisabled style={props.textStyle}>
|
|
98
|
+
<StyledButtonDisabled style={{ ...props.style, backgroundColor: theme.colors.disabled }}>
|
|
99
|
+
<StyledTextDisabled style={{ ...props.textStyle, color: theme.colors.backgroundGray200 }}>
|
|
99
100
|
{props.text}
|
|
100
101
|
</StyledTextDisabled>
|
|
101
102
|
</StyledButtonDisabled>
|
|
@@ -119,7 +120,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
119
120
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
120
121
|
disabled={props.isDisabledWithSameStyles}
|
|
121
122
|
>
|
|
122
|
-
<StyledButton style={{ ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: props.style?.borderRadius }}>
|
|
123
|
+
<StyledButton style={{ ...props.style, backgroundColor: props.useArrow ? theme.colors.white : props.bgColor ?? theme.colors.primary, borderColor: props.useArrow ? theme.colors.white : props.borderColor ?? theme.colors.primary, borderRadius: props.style?.borderRadius }}>
|
|
123
124
|
{props.icon ? (
|
|
124
125
|
<props.icon {...props.iconProps} />
|
|
125
126
|
) : null}
|
|
@@ -127,7 +128,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
127
128
|
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
|
|
128
129
|
) : null}
|
|
129
130
|
{props.text ? (
|
|
130
|
-
<StyledText style={{ ...props.textStyle, color: props?.textStyle?.color }}>{props.text}</StyledText>
|
|
131
|
+
<StyledText style={{ ...props.textStyle, color: props.useArrow ? theme.colors.btnFont : props?.textStyle?.color ?? theme.colors.white }}>{props.text}</StyledText>
|
|
131
132
|
) : null}
|
|
132
133
|
{props.imgRightSrc ? (
|
|
133
134
|
<EndImage style={props.imgRightStyle} source={props.imgRightSrc} />
|