ordering-ui-react-native 0.15.58 → 0.15.59-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 +5 -3
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/AddressForm/index.tsx +18 -2
- package/src/components/BusinessController/index.tsx +16 -8
- package/src/components/BusinessTypeFilter/index.tsx +3 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +23 -2
- package/src/components/DriverTips/index.tsx +11 -6
- package/src/components/LanguageSelector/index.tsx +7 -2
- package/src/components/LoginForm/index.tsx +120 -30
- package/src/components/LoginForm/styles.tsx +6 -0
- package/src/components/OrderDetails/index.tsx +7 -21
- package/src/components/PaymentOptions/index.tsx +67 -50
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +145 -61
- package/src/components/SingleProductCard/index.tsx +16 -4
- package/src/components/SingleProductReview/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +1 -2
- package/src/components/UpsellingProducts/index.tsx +1 -1
- package/src/components/UserProfileForm/index.tsx +63 -6
- package/src/components/UserProfileForm/styles.tsx +8 -0
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OModal.tsx +1 -1
- package/src/hooks/useCountdownTimer.tsx +26 -0
- package/src/navigators/CheckoutNavigator.tsx +6 -0
- package/src/navigators/HomeNavigator.tsx +12 -0
- package/src/pages/BusinessesListing.tsx +1 -1
- package/src/pages/MultiCheckout.tsx +31 -0
- package/src/pages/MultiOrdersDetails.tsx +27 -0
- package/src/pages/Sessions.tsx +22 -0
- package/src/theme.json +0 -1
- package/src/types/index.tsx +18 -11
- package/src/utils/index.tsx +68 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
- package/themes/business/src/components/Chat/index.tsx +42 -90
- package/themes/business/src/components/DriverMap/index.tsx +6 -5
- package/themes/business/src/components/LoginForm/index.tsx +89 -2
- package/themes/business/src/components/LoginForm/styles.tsx +6 -0
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
- package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +41 -7
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +5 -2
- package/themes/business/src/components/PreviousOrders/index.tsx +7 -7
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
- package/themes/business/src/components/shared/OModal.tsx +1 -1
- package/themes/business/src/types/index.tsx +6 -1
- 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/BusinessMenu/index.tsx +39 -28
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
- package/themes/kiosk/src/components/Cart/index.tsx +11 -12
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
- package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
- package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
- package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
- package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
- package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
- package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +32 -27
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
- package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
- package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
- package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +1 -0
- package/themes/original/index.tsx +22 -8
- package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
- package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
- package/themes/original/src/components/AddressForm/index.tsx +7 -6
- package/themes/original/src/components/AddressList/index.tsx +30 -18
- package/themes/original/src/components/AppleLogin/index.tsx +9 -13
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +136 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +4 -0
- package/themes/original/src/components/BusinessController/index.tsx +48 -11
- package/themes/original/src/components/BusinessController/styles.tsx +27 -0
- package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
- package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
- package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +196 -58
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
- package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +51 -53
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +105 -22
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
- package/themes/original/src/components/BusinessesListing/index.tsx +126 -65
- package/themes/original/src/components/BusinessesListing/styles.tsx +11 -3
- package/themes/original/src/components/Cart/index.tsx +60 -41
- package/themes/original/src/components/Checkout/index.tsx +48 -32
- package/themes/original/src/components/DriverTips/index.tsx +17 -12
- package/themes/original/src/components/Favorite/index.tsx +92 -0
- package/themes/original/src/components/Favorite/styles.tsx +22 -0
- package/themes/original/src/components/FavoriteList/index.tsx +298 -0
- package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
- package/themes/original/src/components/GPSButton/index.tsx +15 -8
- package/themes/original/src/components/GoogleMap/index.tsx +11 -11
- package/themes/original/src/components/Help/index.tsx +21 -4
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
- package/themes/original/src/components/LastOrders/index.tsx +12 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/original/src/components/LoginForm/index.tsx +332 -164
- package/themes/original/src/components/LoginForm/styles.tsx +1 -3
- package/themes/original/src/components/MessageListing/index.tsx +10 -1
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +10 -1
- package/themes/original/src/components/MomentOption/styles.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
- package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
- package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
- package/themes/original/src/components/MyOrders/index.tsx +120 -32
- package/themes/original/src/components/MyOrders/styles.tsx +8 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +135 -49
- package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
- package/themes/original/src/components/OrderSummary/index.tsx +2 -2
- package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +130 -38
- package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
- package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
- package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptions/index.tsx +57 -36
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
- package/themes/original/src/components/ProductForm/index.tsx +70 -62
- package/themes/original/src/components/ProductForm/styles.tsx +0 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
- package/themes/original/src/components/Promotions/index.tsx +151 -133
- package/themes/original/src/components/Promotions/styles.tsx +3 -23
- package/themes/original/src/components/SearchBar/index.tsx +10 -4
- package/themes/original/src/components/Sessions/index.tsx +160 -0
- package/themes/original/src/components/Sessions/styles.tsx +15 -0
- package/themes/original/src/components/SignupForm/index.tsx +237 -126
- package/themes/original/src/components/SingleOrderCard/index.tsx +282 -0
- package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +59 -17
- package/themes/original/src/components/StripeElementsForm/index.tsx +16 -8
- package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
- package/themes/original/src/components/UserDetails/index.tsx +5 -96
- package/themes/original/src/components/UserFormDetails/index.tsx +25 -26
- package/themes/original/src/components/UserProfile/index.tsx +52 -5
- package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
- package/themes/original/src/components/UserVerification/index.tsx +178 -192
- package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
- package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
- package/themes/original/src/components/Wallets/index.tsx +76 -9
- package/themes/original/src/components/Wallets/styles.tsx +21 -0
- package/themes/original/src/components/shared/OModal.tsx +4 -2
- package/themes/original/src/types/index.tsx +189 -35
- package/themes/original/src/utils/index.tsx +85 -2
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
UpsellingPage as UpsellingPageController,
|
|
5
5
|
useUtils,
|
|
6
6
|
useLanguage,
|
|
7
|
-
|
|
7
|
+
useOrder
|
|
8
8
|
} from 'ordering-components/native'
|
|
9
9
|
import { useTheme } from 'styled-components/native';
|
|
10
10
|
import { OText, OIcon, OBottomPopup, OButton } from '../shared'
|
|
@@ -62,7 +62,19 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
62
62
|
borderRadius: 7.6,
|
|
63
63
|
borderColor: theme.colors.textSecondary,
|
|
64
64
|
height: 38
|
|
65
|
-
}
|
|
65
|
+
},
|
|
66
|
+
headerItem: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
marginVertical: 2,
|
|
70
|
+
marginHorizontal: 20,
|
|
71
|
+
},
|
|
72
|
+
btnBackArrow: {
|
|
73
|
+
borderWidth: 0,
|
|
74
|
+
backgroundColor: theme.colors.clear,
|
|
75
|
+
shadowColor: theme.colors.clear,
|
|
76
|
+
padding: 40,
|
|
77
|
+
},
|
|
66
78
|
})
|
|
67
79
|
|
|
68
80
|
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
@@ -77,11 +89,11 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
77
89
|
? cart?.products.map((product: any) => product.id)
|
|
78
90
|
: []
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
const productsList = !upsellingProducts.loading && !upsellingProducts.error
|
|
93
|
+
? upsellingProducts?.products?.length
|
|
94
|
+
? upsellingProducts?.products.filter((product: any) => !cartProducts.includes(product.id))
|
|
95
|
+
: (props?.products ?? []).filter((product: any) => !cartProducts.includes(product.id)) ?? []
|
|
96
|
+
: []
|
|
85
97
|
|
|
86
98
|
useEffect(() => {
|
|
87
99
|
if (!isCustomMode && !props.products) {
|
|
@@ -95,15 +107,11 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
95
107
|
}
|
|
96
108
|
}, [upsellingProducts.loading, upsellingProducts?.products.length])
|
|
97
109
|
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
isCheckout && Object.keys(cart).length === 0 && onNavigationRedirect && onNavigationRedirect('MyOrders')
|
|
100
|
-
}, [cart, isCheckout])
|
|
101
|
-
|
|
102
110
|
const handleFormProduct = (product: any) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
111
|
+
onNavigationRedirect && onNavigationRedirect('ProductDetails', {
|
|
112
|
+
product: product,
|
|
113
|
+
businessId: product?.api?.businessId,
|
|
114
|
+
businessSlug: business.slug,
|
|
107
115
|
})
|
|
108
116
|
}
|
|
109
117
|
|
|
@@ -119,8 +127,8 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
119
127
|
!upsellingProducts.loading && (
|
|
120
128
|
<>
|
|
121
129
|
{
|
|
122
|
-
!upsellingProducts.error ? productsList.map((product: any) => (
|
|
123
|
-
<Item key={product.id}>
|
|
130
|
+
!upsellingProducts.error ? productsList.map((product: any, i: number) => (
|
|
131
|
+
<Item key={`${product.id}_${i}`}>
|
|
124
132
|
<View style={{ flexBasis: '57%' }}>
|
|
125
133
|
<Details>
|
|
126
134
|
<OText size={12} lineHeight={18} numberOfLines={1} ellipsizeMode='tail'>{product.name}</OText>
|
|
@@ -148,50 +156,54 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
148
156
|
)
|
|
149
157
|
}
|
|
150
158
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
const UpsellingContent = () => {
|
|
160
|
+
return (
|
|
161
|
+
<>
|
|
162
|
+
<View style={{ ...styles.headerItem, flex: 1, marginTop: Platform.OS == 'ios' ? 35 : 70 }}>
|
|
163
|
+
<OButton
|
|
164
|
+
imgLeftSrc={theme.images.general.arrow_left}
|
|
165
|
+
imgRightSrc={null}
|
|
166
|
+
style={styles.btnBackArrow}
|
|
167
|
+
onClick={() => onGoBack()}
|
|
168
|
+
imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
|
|
169
|
+
/>
|
|
170
|
+
</View>
|
|
171
|
+
<ScrollView style={{ marginTop: 10, marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
|
|
160
172
|
{productsList.length > 0 &&
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
173
|
+
<View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
|
|
174
|
+
<OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
|
|
175
|
+
<UpsellingLayout />
|
|
176
|
+
</View>
|
|
177
|
+
}
|
|
178
|
+
<View style={{ paddingHorizontal: 40 }}>
|
|
179
|
+
<OText size={20} lineHeight={30} weight={600} style={{ marginTop: 10, marginBottom: 17 }}>{t('YOUR_CART', 'Your cart')}</OText>
|
|
180
|
+
<OrderSummary
|
|
181
|
+
cart={cart}
|
|
182
|
+
isCartPending={cart?.status === 2}
|
|
183
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
184
|
+
/>
|
|
185
|
+
</View>
|
|
186
|
+
</ScrollView>
|
|
187
|
+
<View
|
|
188
|
+
style={{
|
|
189
|
+
alignItems: 'center',
|
|
190
|
+
bottom: props.isPage ? Platform.OS === 'ios' ? 0 : 20 : Platform.OS === 'ios' ? bottom + 59 : bottom + 125
|
|
191
|
+
}}
|
|
192
|
+
>
|
|
193
|
+
<OButton
|
|
194
|
+
imgRightSrc=''
|
|
195
|
+
text={t('CHECKOUT', 'Checkout')}
|
|
196
|
+
style={{ ...styles.closeUpsellingButton }}
|
|
197
|
+
textStyle={{ color: theme.colors.white, fontSize: 14 }}
|
|
198
|
+
onClick={() => {
|
|
199
|
+
handleUpsellingPage()
|
|
200
|
+
setIsCheckout(true)
|
|
201
|
+
}}
|
|
202
|
+
/>
|
|
203
|
+
</View>
|
|
204
|
+
</>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
195
207
|
|
|
196
208
|
return (
|
|
197
209
|
<>
|
|
@@ -199,20 +211,20 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
199
211
|
<UpsellingLayout />
|
|
200
212
|
) : (
|
|
201
213
|
<>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
{props.isPage ? (
|
|
215
|
+
<UpsellingContent />
|
|
216
|
+
) : (
|
|
217
|
+
canOpenUpselling && !modalIsOpen && (
|
|
218
|
+
<OBottomPopup
|
|
219
|
+
title={''}
|
|
220
|
+
open={openUpselling}
|
|
221
|
+
onClose={() => handleUpsellingPage()}
|
|
222
|
+
isStatusBar
|
|
223
|
+
>
|
|
224
|
+
<UpsellingContent />
|
|
225
|
+
</OBottomPopup>
|
|
226
|
+
)
|
|
227
|
+
)}
|
|
216
228
|
</>
|
|
217
229
|
)}
|
|
218
230
|
</>
|
|
@@ -3,17 +3,14 @@ import { TouchableOpacity, View } from 'react-native';
|
|
|
3
3
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
4
4
|
|
|
5
5
|
import { UDContainer, UDHeader, UDForm, UDInfo, EditBtn } from './styles';
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
UserFormDetails as UserFormController,
|
|
8
9
|
useLanguage,
|
|
9
10
|
useSession,
|
|
10
|
-
ToastType,
|
|
11
|
-
useToast
|
|
12
11
|
} from 'ordering-components/native';
|
|
13
12
|
import { useTheme } from 'styled-components/native';
|
|
14
|
-
import { OIcon, OText
|
|
15
|
-
import { VerifyPhone } from '../VerifyPhone';
|
|
16
|
-
import Spinner from 'react-native-loading-spinner-overlay';
|
|
13
|
+
import { OIcon, OText } from '../shared';
|
|
17
14
|
|
|
18
15
|
import { UserFormDetailsUI } from '../UserFormDetails';
|
|
19
16
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
@@ -29,33 +26,15 @@ const UserDetailsUI = (props: any) => {
|
|
|
29
26
|
isUserDetailsEdit,
|
|
30
27
|
phoneUpdate,
|
|
31
28
|
togglePhoneUpdate,
|
|
32
|
-
isCheckout
|
|
33
|
-
checkPhoneCodeState,
|
|
34
|
-
handleSendVerifyCode,
|
|
35
|
-
handleCheckPhoneCode,
|
|
36
|
-
verifyPhoneState,
|
|
37
|
-
isVerifiedPhone,
|
|
38
|
-
setCheckPhoneCodeState
|
|
29
|
+
isCheckout
|
|
39
30
|
} = props
|
|
40
31
|
|
|
41
32
|
const theme = useTheme();
|
|
42
33
|
|
|
43
34
|
const [, t] = useLanguage()
|
|
44
35
|
const [{ user }] = useSession()
|
|
45
|
-
const [, { showToast }] = useToast();
|
|
46
|
-
|
|
47
36
|
const userData = props.userData || (!formState.result.error && formState.result?.result) || user
|
|
48
37
|
|
|
49
|
-
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
50
|
-
const [willVerifyOtpState, setWillVerifyOtpState] = useState(false);
|
|
51
|
-
const [phoneInputData, setPhoneInputData] = useState({
|
|
52
|
-
error: '',
|
|
53
|
-
phone: {
|
|
54
|
-
country_phone_code: null,
|
|
55
|
-
cellphone: null,
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
38
|
|
|
60
39
|
useEffect(() => {
|
|
61
40
|
if (isUserDetailsEdit) {
|
|
@@ -76,54 +55,6 @@ const UserDetailsUI = (props: any) => {
|
|
|
76
55
|
}
|
|
77
56
|
}, [user?.country_phone_code])
|
|
78
57
|
|
|
79
|
-
const handleVerifyCodeClick = () => {
|
|
80
|
-
if (formState?.changes?.cellphone && formState?.changes?.country_phone_code) {
|
|
81
|
-
const { cellphone, country_phone_code: countryPhoneCode } = formState?.changes
|
|
82
|
-
|
|
83
|
-
setPhoneInputData({
|
|
84
|
-
error: '',
|
|
85
|
-
phone: {
|
|
86
|
-
country_phone_code: countryPhoneCode,
|
|
87
|
-
cellphone: cellphone,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
handleSendVerifyCode({
|
|
91
|
-
cellphone: cellphone,
|
|
92
|
-
country_phone_code: countryPhoneCode
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
useEffect(() => {
|
|
98
|
-
if (willVerifyOtpState) handleVerifyCodeClick()
|
|
99
|
-
}, [willVerifyOtpState])
|
|
100
|
-
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
if (verifyPhoneState && !verifyPhoneState?.loading) {
|
|
103
|
-
if (verifyPhoneState.result?.error) {
|
|
104
|
-
const message = typeof verifyPhoneState?.result?.result === 'string'
|
|
105
|
-
? verifyPhoneState?.result?.result
|
|
106
|
-
: verifyPhoneState?.result?.result[0]
|
|
107
|
-
verifyPhoneState.result?.result && showToast(
|
|
108
|
-
ToastType.Error,
|
|
109
|
-
message
|
|
110
|
-
)
|
|
111
|
-
setWillVerifyOtpState(false)
|
|
112
|
-
return
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const okResult = verifyPhoneState.result?.result === 'OK'
|
|
116
|
-
if (okResult) {
|
|
117
|
-
!isModalVisible && setIsModalVisible(true)
|
|
118
|
-
setWillVerifyOtpState(false)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}, [verifyPhoneState])
|
|
122
|
-
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
if (isVerifiedPhone) setIsModalVisible(false)
|
|
125
|
-
}, [isVerifiedPhone])
|
|
126
|
-
|
|
127
58
|
return (
|
|
128
59
|
<>
|
|
129
60
|
{(validationFields.loading || formState.loading) && (
|
|
@@ -138,7 +69,7 @@ const UserDetailsUI = (props: any) => {
|
|
|
138
69
|
{!(validationFields.loading || formState.loading) && (
|
|
139
70
|
<UDContainer>
|
|
140
71
|
<UDHeader>
|
|
141
|
-
<OText size={16} lineHeight={24} weight={'500'}>
|
|
72
|
+
<OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal}>
|
|
142
73
|
{t('CUSTOMER_DETAILS', 'Customer Details')}
|
|
143
74
|
</OText>
|
|
144
75
|
{cartStatus !== 2 && (
|
|
@@ -186,32 +117,10 @@ const UserDetailsUI = (props: any) => {
|
|
|
186
117
|
)}
|
|
187
118
|
</UDInfo>
|
|
188
119
|
) : (
|
|
189
|
-
<UserFormDetailsUI
|
|
190
|
-
{...props}
|
|
191
|
-
phoneUpdate={phoneUpdate}
|
|
192
|
-
togglePhoneUpdate={togglePhoneUpdate}
|
|
193
|
-
isCheckout={isCheckout}
|
|
194
|
-
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
195
|
-
/>
|
|
120
|
+
<UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} isCheckout={isCheckout} />
|
|
196
121
|
)}
|
|
197
122
|
</UDContainer>
|
|
198
123
|
)}
|
|
199
|
-
<OModal
|
|
200
|
-
open={isModalVisible}
|
|
201
|
-
onClose={() => setIsModalVisible(false)}
|
|
202
|
-
entireModal
|
|
203
|
-
>
|
|
204
|
-
<VerifyPhone
|
|
205
|
-
phone={phoneInputData.phone}
|
|
206
|
-
verifyPhoneState={verifyPhoneState}
|
|
207
|
-
checkPhoneCodeState={checkPhoneCodeState}
|
|
208
|
-
handleCheckPhoneCode={handleCheckPhoneCode}
|
|
209
|
-
setCheckPhoneCodeState={setCheckPhoneCodeState}
|
|
210
|
-
handleVerifyCodeClick={handleVerifyCodeClick}
|
|
211
|
-
onClose={() => setIsModalVisible(false)}
|
|
212
|
-
/>
|
|
213
|
-
</OModal>
|
|
214
|
-
<Spinner visible={verifyPhoneState?.loading} />
|
|
215
124
|
</>
|
|
216
125
|
)
|
|
217
126
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Platform, StyleSheet,
|
|
2
|
+
import { Platform, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useSession, useLanguage, ToastType, useToast, useConfig } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form';
|
|
@@ -141,8 +141,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
141
141
|
if (
|
|
142
142
|
formState.changes?.cellphone === null &&
|
|
143
143
|
((validationFields?.fields?.checkout?.cellphone?.enabled &&
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
validationFields?.fields?.checkout?.cellphone?.required) ||
|
|
145
|
+
configs?.verification_phone_required?.value === '1')
|
|
146
146
|
) {
|
|
147
147
|
showToast(
|
|
148
148
|
ToastType.Error,
|
|
@@ -153,9 +153,6 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
153
153
|
);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
if (formState?.changes?.cellphone && !isVerifiedPhone) {
|
|
157
|
-
showToast(ToastType.Error, t('VERIFY_ERROR_PHONE_NUMBER', 'The Phone Number field is not verified'))
|
|
158
|
-
}
|
|
159
156
|
let changes = null;
|
|
160
157
|
if (user?.cellphone && !userPhoneNumber) {
|
|
161
158
|
changes = {
|
|
@@ -182,7 +179,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
182
179
|
handleChangeInput(phoneNumber, true);
|
|
183
180
|
};
|
|
184
181
|
|
|
185
|
-
const changeCountry = (country
|
|
182
|
+
const changeCountry = (country: any) => {
|
|
186
183
|
let countryCode = {
|
|
187
184
|
country_code: {
|
|
188
185
|
name: 'country_code',
|
|
@@ -229,7 +226,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
229
226
|
|
|
230
227
|
useEffect(() => {
|
|
231
228
|
if (!phoneInputData.error && phoneInputData?.phone?.country_phone_code && phoneInputData?.phone?.cellphone) {
|
|
232
|
-
setWillVerifyOtpState(true)
|
|
229
|
+
setWillVerifyOtpState?.(true)
|
|
233
230
|
}
|
|
234
231
|
}, [phoneInputData])
|
|
235
232
|
|
|
@@ -325,9 +322,9 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
325
322
|
<PhoneInputNumber
|
|
326
323
|
data={phoneInputData}
|
|
327
324
|
handleData={(val: any) => handleChangePhoneNumber(val)}
|
|
328
|
-
changeCountry={(val
|
|
325
|
+
changeCountry={(val: any) => changeCountry(val)}
|
|
329
326
|
defaultValue={phoneUpdate ? '' : user?.cellphone}
|
|
330
|
-
defaultCode={user?.
|
|
327
|
+
defaultCode={user?.country_phone_code || null}
|
|
331
328
|
boxStyle={styles.phoneSelect}
|
|
332
329
|
inputStyle={styles.phoneInputStyle}
|
|
333
330
|
textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
|
|
@@ -379,16 +376,18 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
379
376
|
rules={getInputRules({ name: 'password', code: 'password' })}
|
|
380
377
|
defaultValue=''
|
|
381
378
|
/>
|
|
382
|
-
<
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
379
|
+
<Controller
|
|
380
|
+
control={control}
|
|
381
|
+
render={({ onChange, value }: any) => (
|
|
382
|
+
<TouchableOpacity
|
|
383
|
+
style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 20, width: '100%' }}
|
|
384
|
+
onPress={() => {
|
|
385
|
+
onChange(!value)
|
|
386
|
+
handleChangePromotions(!value)
|
|
387
|
+
}}
|
|
388
|
+
>
|
|
386
389
|
<CheckBox
|
|
387
390
|
value={value}
|
|
388
|
-
onValueChange={newValue => {
|
|
389
|
-
onChange(newValue)
|
|
390
|
-
handleChangePromotions(newValue)
|
|
391
|
-
}}
|
|
392
391
|
boxType={'square'}
|
|
393
392
|
tintColors={{
|
|
394
393
|
true: theme.colors.primary,
|
|
@@ -399,14 +398,14 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
399
398
|
onTintColor={theme.colors.primary}
|
|
400
399
|
style={Platform.OS === 'ios' && styles.checkBoxStyle}
|
|
401
400
|
/>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
401
|
+
<OText style={{ fontSize: 14, paddingHorizontal: 5, paddingLeft: 10 }}>{t('RECEIVE_NEWS_EXCLUSIVE_PROMOTIONS', 'Receive newsletters and exclusive promotions')}</OText>
|
|
402
|
+
</TouchableOpacity>
|
|
403
|
+
)}
|
|
404
|
+
name='promotions'
|
|
405
|
+
defaultValue={formState?.result?.result
|
|
406
|
+
? !!formState?.result?.result?.settings?.notification?.newsletter
|
|
407
|
+
: !!(formState?.changes?.settings?.notification?.newsletter ?? (user && user?.settings?.notification?.newsletter))}
|
|
408
|
+
/>
|
|
410
409
|
</UDWrapper>
|
|
411
410
|
)}
|
|
412
411
|
{validationFields?.loading && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
UserFormDetails as UserProfileController,
|
|
4
4
|
useSession,
|
|
@@ -17,7 +17,9 @@ import { LanguageSelector } from '../LanguageSelector'
|
|
|
17
17
|
import MessageCircle from 'react-native-vector-icons/AntDesign'
|
|
18
18
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
19
19
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons'
|
|
20
|
+
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
20
21
|
import FastImage from 'react-native-fast-image'
|
|
22
|
+
import { OAlert } from '../../../../../src/components/shared'
|
|
21
23
|
|
|
22
24
|
import {
|
|
23
25
|
OIcon,
|
|
@@ -35,7 +37,9 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
35
37
|
const ProfileListUI = (props: ProfileParams) => {
|
|
36
38
|
const {
|
|
37
39
|
navigation,
|
|
38
|
-
formState
|
|
40
|
+
formState,
|
|
41
|
+
handleRemoveAccount,
|
|
42
|
+
removeAccountState
|
|
39
43
|
} = props;
|
|
40
44
|
|
|
41
45
|
const theme = useTheme();
|
|
@@ -92,17 +96,21 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
92
96
|
});
|
|
93
97
|
|
|
94
98
|
|
|
95
|
-
const [{ user }] = useSession();
|
|
99
|
+
const [{ user }, { logout }] = useSession();
|
|
96
100
|
const [, t] = useLanguage();
|
|
97
101
|
const [{ configs }] = useConfig();
|
|
98
102
|
const [, { showToast }] = useToast();
|
|
99
103
|
const { errors } = useForm();
|
|
100
104
|
|
|
105
|
+
const isAdmin = user?.level === 0
|
|
106
|
+
|
|
101
107
|
const { height } = useWindowDimensions();
|
|
102
108
|
const { top, bottom } = useSafeAreaInsets();
|
|
103
109
|
|
|
104
|
-
const
|
|
105
|
-
|
|
110
|
+
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
111
|
+
|
|
112
|
+
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
113
|
+
const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
|
|
106
114
|
const onRedirect = (route: string, params?: any) => {
|
|
107
115
|
navigation.navigate(route, params)
|
|
108
116
|
}
|
|
@@ -136,6 +144,24 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
136
144
|
onNavigationRedirect: (route: string, params: any) => props.navigation.navigate(route, params)
|
|
137
145
|
}
|
|
138
146
|
|
|
147
|
+
const onRemoveAccount = () => {
|
|
148
|
+
setConfirm({
|
|
149
|
+
open: true,
|
|
150
|
+
content: [t('QUESTION_REMOVE_ACCOUNT', 'Are you sure that you want to remove your account?')],
|
|
151
|
+
title: t('ACCOUNT_ALERT', 'Account alert'),
|
|
152
|
+
handleOnAccept: () => {
|
|
153
|
+
setConfirm({ ...confirm, open: false })
|
|
154
|
+
handleRemoveAccount && handleRemoveAccount(user?.id)
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
if (removeAccountState?.result === 'OK') {
|
|
161
|
+
logout()
|
|
162
|
+
}
|
|
163
|
+
}, [removeAccountState])
|
|
164
|
+
|
|
139
165
|
return (
|
|
140
166
|
<View style={{ flex: 1, height: height - top - bottom - 62, paddingTop: 20 }}>
|
|
141
167
|
{/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
@@ -189,14 +215,35 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
189
215
|
<OIcon src={theme.images.general.ic_help} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
190
216
|
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('HELP', 'Help')}</OText>
|
|
191
217
|
</ListItem>
|
|
218
|
+
<ListItem onPress={() => navigation.navigate('Sessions')} activeOpacity={0.7}>
|
|
219
|
+
<Ionicons name='md-list-outline' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
220
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('SESSIONS', 'Sessions')}</OText>
|
|
221
|
+
</ListItem>
|
|
222
|
+
<ListItem onPress={() => navigation.navigate('Favorite')} activeOpacity={0.7}>
|
|
223
|
+
<Ionicons name='heart-outline' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
224
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('FAVORITES', 'Favorites')}</OText>
|
|
225
|
+
</ListItem>
|
|
192
226
|
</Actions>
|
|
193
227
|
|
|
194
228
|
<Actions>
|
|
195
229
|
<LanguageSelector iconColor={theme.colors.textNormal} pickerStyle={langPickerStyle} />
|
|
196
230
|
<View style={{ height: 17 }} />
|
|
197
231
|
<LogoutButton color={theme.colors.textNormal} text={t('LOGOUT', 'Logout')} />
|
|
232
|
+
<View style={{ height: 17 }} />
|
|
233
|
+
<ListItem disabled={isAdmin} onPress={() => onRemoveAccount()} activeOpacity={0.7}>
|
|
234
|
+
<OIcon src={theme.images.general.user} width={16} color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
235
|
+
<OText size={14} lineHeight={24} weight={'400'} style={{ opacity: isAdmin ? 0.5 : 1 }} color={theme.colors.danger5}>{t('REMOVE_ACCOUNT', 'Remove account')}</OText>
|
|
236
|
+
</ListItem>
|
|
198
237
|
</Actions>
|
|
199
238
|
</ListWrap>
|
|
239
|
+
<OAlert
|
|
240
|
+
open={confirm.open}
|
|
241
|
+
title={confirm.title}
|
|
242
|
+
content={confirm.content}
|
|
243
|
+
onAccept={confirm.handleOnAccept}
|
|
244
|
+
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
245
|
+
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
246
|
+
/>
|
|
200
247
|
</View>
|
|
201
248
|
);
|
|
202
249
|
};
|
|
@@ -56,7 +56,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
56
56
|
},
|
|
57
57
|
pagePadding: {
|
|
58
58
|
paddingLeft: 40,
|
|
59
|
-
paddingRight: 40
|
|
59
|
+
paddingRight: 40,
|
|
60
|
+
justifyContent: 'center',
|
|
60
61
|
},
|
|
61
62
|
navBarStyle: {
|
|
62
63
|
paddingLeft: 40,
|
|
@@ -205,8 +206,8 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
205
206
|
},
|
|
206
207
|
});
|
|
207
208
|
handleSendVerifyCode({
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
cellphone: cellphone,
|
|
210
|
+
country_phone_code: countryPhoneCode
|
|
210
211
|
})
|
|
211
212
|
}
|
|
212
213
|
}
|
|
@@ -277,15 +278,16 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
277
278
|
|
|
278
279
|
return (
|
|
279
280
|
<>
|
|
281
|
+
<NavBar
|
|
282
|
+
title={t('ACCOUNT', 'Account')}
|
|
283
|
+
titleAlign={'center'}
|
|
284
|
+
onActionLeft={() => navigation.goBack()}
|
|
285
|
+
showCall={false}
|
|
286
|
+
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 30 , marginTop: Platform.OS === 'ios' ? 50 : 40 }}
|
|
287
|
+
/>
|
|
280
288
|
<KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
|
|
281
289
|
<Container noPadding>
|
|
282
|
-
|
|
283
|
-
onActionLeft={() => navigation.goBack()}
|
|
284
|
-
btnStyle={{ paddingStart: 0 }}
|
|
285
|
-
title={t('ACCOUNT', 'Account')}
|
|
286
|
-
isVertical
|
|
287
|
-
style={styles.navBarStyle}
|
|
288
|
-
/>
|
|
290
|
+
|
|
289
291
|
<CenterView style={styles.pagePadding}>
|
|
290
292
|
<View style={styles.photo}>
|
|
291
293
|
{user?.photo ? (
|
|
@@ -305,7 +307,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
305
307
|
icon={theme.images.general.camera}
|
|
306
308
|
borderColor={theme.colors.clear}
|
|
307
309
|
iconStyle={{ width: 20, height: 20 }}
|
|
308
|
-
style={{ maxWidth: 40, position: 'absolute',
|
|
310
|
+
style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
|
|
309
311
|
onClick={() => handleImagePicker()}
|
|
310
312
|
/>
|
|
311
313
|
</CenterView>
|
|
@@ -326,13 +328,13 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
326
328
|
entireModal
|
|
327
329
|
>
|
|
328
330
|
<VerifyPhone
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
331
|
+
phone={phoneInputData.phone}
|
|
332
|
+
verifyPhoneState={verifyPhoneState}
|
|
333
|
+
checkPhoneCodeState={checkPhoneCodeState}
|
|
334
|
+
handleCheckPhoneCode={handleCheckPhoneCode}
|
|
335
|
+
setCheckPhoneCodeState={setCheckPhoneCodeState}
|
|
336
|
+
handleVerifyCodeClick={handleVerifyCodeClick}
|
|
337
|
+
onClose={() => setIsModalVisible(false)}
|
|
336
338
|
/>
|
|
337
339
|
</OModal>
|
|
338
340
|
</>
|