ordering-ui-react-native 0.12.54 → 0.12.58

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.
Files changed (205) hide show
  1. package/package.json +1 -1
  2. package/src/components/Cart/index.tsx +50 -16
  3. package/src/components/OrderDetails/index.tsx +8 -0
  4. package/src/components/OrderSummary/index.tsx +38 -3
  5. package/src/layouts/Container.tsx +1 -1
  6. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +8 -0
  7. package/themes/business/src/components/OrderDetails/styles.tsx +1 -0
  8. package/themes/business/src/layouts/Container.tsx +3 -1
  9. package/themes/doordash/src/components/Cart/index.tsx +36 -2
  10. package/themes/doordash/src/components/OrderDetails/index.tsx +8 -0
  11. package/themes/doordash/src/components/OrderSummary/index.tsx +36 -3
  12. package/themes/doordash/src/layouts/Container.tsx +1 -1
  13. package/themes/instacart/src/components/Cart/index.tsx +37 -3
  14. package/themes/instacart/src/components/OrderDetails/index.tsx +8 -0
  15. package/themes/instacart/src/components/OrderSummary/index.tsx +37 -4
  16. package/themes/instacart/src/layouts/Container.tsx +1 -1
  17. package/themes/kiosk/src/layouts/Container.tsx +2 -1
  18. package/themes/original/src/components/Cart/index.tsx +268 -234
  19. package/themes/original/src/components/OrderDetails/index.tsx +723 -715
  20. package/themes/original/src/components/OrderSummary/index.tsx +37 -3
  21. package/themes/original/src/layouts/Container.tsx +1 -1
  22. package/themes/single-business/src/components/Cart/index.tsx +92 -16
  23. package/themes/single-business/src/components/Cart/styles.tsx +39 -0
  24. package/themes/single-business/src/components/CartContent/index.tsx +56 -52
  25. package/themes/single-business/src/components/CartContent/styles.tsx +2 -16
  26. package/themes/single-business/src/components/PhoneInputNumber/index.tsx +103 -112
  27. package/themes/single-business/src/components/UserDetails/index.tsx +107 -111
  28. package/themes/single-business/src/components/UserDetails/styles.tsx +3 -8
  29. package/themes/single-business/src/components/UserFormDetails/index.tsx +279 -326
  30. package/themes/single-business/src/components/UserFormDetails/styles.tsx +7 -5
  31. package/themes/single-business/src/layouts/Container.tsx +1 -1
  32. package/themes/uber-eats/src/components/Cart/index.tsx +37 -3
  33. package/themes/uber-eats/src/components/OrderDetails/index.tsx +8 -0
  34. package/themes/uber-eats/src/components/OrderSummary/index.tsx +40 -6
  35. package/themes/uber-eats/src/layouts/Container.tsx +1 -1
  36. package/themes/franchises/index.tsx +0 -111
  37. package/themes/franchises/src/components/ActiveOrders/index.tsx +0 -134
  38. package/themes/franchises/src/components/ActiveOrders/styles.tsx +0 -44
  39. package/themes/franchises/src/components/AddressDetails/index.tsx +0 -77
  40. package/themes/franchises/src/components/AddressDetails/styles.tsx +0 -21
  41. package/themes/franchises/src/components/AddressForm/index.tsx +0 -837
  42. package/themes/franchises/src/components/AddressForm/styles.tsx +0 -27
  43. package/themes/franchises/src/components/AddressList/index.tsx +0 -338
  44. package/themes/franchises/src/components/AddressList/styles.tsx +0 -20
  45. package/themes/franchises/src/components/AppleLogin/index.tsx +0 -149
  46. package/themes/franchises/src/components/AppleLogin/styles.tsx +0 -21
  47. package/themes/franchises/src/components/BottomWrapper/index.tsx +0 -29
  48. package/themes/franchises/src/components/BusinessBasicInformation/index.tsx +0 -310
  49. package/themes/franchises/src/components/BusinessBasicInformation/styles.tsx +0 -66
  50. package/themes/franchises/src/components/BusinessController/index.tsx +0 -184
  51. package/themes/franchises/src/components/BusinessController/styles.tsx +0 -64
  52. package/themes/franchises/src/components/BusinessFeaturedController/index.tsx +0 -189
  53. package/themes/franchises/src/components/BusinessFeaturedController/styles.tsx +0 -50
  54. package/themes/franchises/src/components/BusinessInformation/index.tsx +0 -202
  55. package/themes/franchises/src/components/BusinessInformation/styles.tsx +0 -39
  56. package/themes/franchises/src/components/BusinessItemAccordion/index.tsx +0 -125
  57. package/themes/franchises/src/components/BusinessItemAccordion/styles.tsx +0 -54
  58. package/themes/franchises/src/components/BusinessProductsCategories/index.tsx +0 -87
  59. package/themes/franchises/src/components/BusinessProductsCategories/styles.tsx +0 -8
  60. package/themes/franchises/src/components/BusinessProductsList/index.tsx +0 -199
  61. package/themes/franchises/src/components/BusinessProductsList/styles.tsx +0 -14
  62. package/themes/franchises/src/components/BusinessProductsListing/index.tsx +0 -292
  63. package/themes/franchises/src/components/BusinessProductsListing/styles.tsx +0 -30
  64. package/themes/franchises/src/components/BusinessReviews/index.tsx +0 -249
  65. package/themes/franchises/src/components/BusinessReviews/styles.tsx +0 -59
  66. package/themes/franchises/src/components/BusinessTypeFilter/index.tsx +0 -127
  67. package/themes/franchises/src/components/BusinessTypeFilter/styles.tsx +0 -40
  68. package/themes/franchises/src/components/BusinessesListing/index.tsx +0 -339
  69. package/themes/franchises/src/components/BusinessesListing/styles.tsx +0 -92
  70. package/themes/franchises/src/components/Cart/index.tsx +0 -298
  71. package/themes/franchises/src/components/Cart/styles.tsx +0 -28
  72. package/themes/franchises/src/components/CartContent/index.tsx +0 -60
  73. package/themes/franchises/src/components/CartContent/styles.tsx +0 -19
  74. package/themes/franchises/src/components/Checkout/index.tsx +0 -664
  75. package/themes/franchises/src/components/Checkout/styles.tsx +0 -89
  76. package/themes/franchises/src/components/CouponControl/index.tsx +0 -119
  77. package/themes/franchises/src/components/CouponControl/styles.tsx +0 -22
  78. package/themes/franchises/src/components/DriverTips/index.tsx +0 -167
  79. package/themes/franchises/src/components/DriverTips/styles.tsx +0 -63
  80. package/themes/franchises/src/components/FacebookLogin/index.tsx +0 -107
  81. package/themes/franchises/src/components/FacebookLogin/styles.tsx +0 -21
  82. package/themes/franchises/src/components/FloatingButton/index.tsx +0 -100
  83. package/themes/franchises/src/components/FloatingButton/styles.tsx +0 -26
  84. package/themes/franchises/src/components/ForgotPasswordForm/index.tsx +0 -156
  85. package/themes/franchises/src/components/ForgotPasswordForm/styles.tsx +0 -11
  86. package/themes/franchises/src/components/GPSButton/index.tsx +0 -84
  87. package/themes/franchises/src/components/GPSButton/styles.ts +0 -6
  88. package/themes/franchises/src/components/GoogleLogin/index.tsx +0 -122
  89. package/themes/franchises/src/components/GoogleLogin/styles.tsx +0 -23
  90. package/themes/franchises/src/components/GoogleMap/index.tsx +0 -229
  91. package/themes/franchises/src/components/Help/index.tsx +0 -56
  92. package/themes/franchises/src/components/Help/styles.tsx +0 -11
  93. package/themes/franchises/src/components/HelpAccountAndPayment/index.tsx +0 -68
  94. package/themes/franchises/src/components/HelpAccountAndPayment/styles.tsx +0 -6
  95. package/themes/franchises/src/components/HelpGuide/index.tsx +0 -67
  96. package/themes/franchises/src/components/HelpGuide/styles.tsx +0 -6
  97. package/themes/franchises/src/components/HelpOrder/index.tsx +0 -79
  98. package/themes/franchises/src/components/HelpOrder/styles.tsx +0 -6
  99. package/themes/franchises/src/components/Home/index.tsx +0 -102
  100. package/themes/franchises/src/components/Home/styles.tsx +0 -18
  101. package/themes/franchises/src/components/LanguageSelector/index.tsx +0 -98
  102. package/themes/franchises/src/components/LanguageSelector/styles.tsx +0 -7
  103. package/themes/franchises/src/components/LastOrder/index.tsx +0 -168
  104. package/themes/franchises/src/components/LastOrder/styles.tsx +0 -16
  105. package/themes/franchises/src/components/LastOrders/index.tsx +0 -104
  106. package/themes/franchises/src/components/LastOrders/styles.tsx +0 -17
  107. package/themes/franchises/src/components/LoginForm/index.tsx +0 -512
  108. package/themes/franchises/src/components/LoginForm/styles.tsx +0 -77
  109. package/themes/franchises/src/components/LogoutButton/index.tsx +0 -36
  110. package/themes/franchises/src/components/Messages/index.tsx +0 -359
  111. package/themes/franchises/src/components/Messages/styles.tsx +0 -20
  112. package/themes/franchises/src/components/MomentOption/index.tsx +0 -321
  113. package/themes/franchises/src/components/MomentOption/styles.tsx +0 -66
  114. package/themes/franchises/src/components/NavBar/index.tsx +0 -129
  115. package/themes/franchises/src/components/NotFoundSource/index.tsx +0 -50
  116. package/themes/franchises/src/components/NotFoundSource/styles.tsx +0 -16
  117. package/themes/franchises/src/components/Notifications/index.tsx +0 -120
  118. package/themes/franchises/src/components/Notifications/styles.ts +0 -21
  119. package/themes/franchises/src/components/OrderDetails/index.tsx +0 -820
  120. package/themes/franchises/src/components/OrderDetails/styles.tsx +0 -120
  121. package/themes/franchises/src/components/OrderSummary/index.tsx +0 -232
  122. package/themes/franchises/src/components/OrderSummary/styles.tsx +0 -41
  123. package/themes/franchises/src/components/OrderTypeSelector/index.tsx +0 -92
  124. package/themes/franchises/src/components/OrderTypeSelector/styles.tsx +0 -27
  125. package/themes/franchises/src/components/OrdersOption/index.tsx +0 -243
  126. package/themes/franchises/src/components/OrdersOption/styles.tsx +0 -5
  127. package/themes/franchises/src/components/PaymentOptionCash/index.tsx +0 -102
  128. package/themes/franchises/src/components/PaymentOptionCash/styles.tsx +0 -18
  129. package/themes/franchises/src/components/PaymentOptionStripe/index.tsx +0 -234
  130. package/themes/franchises/src/components/PaymentOptionStripe/styles.tsx +0 -71
  131. package/themes/franchises/src/components/PaymentOptions/index.tsx +0 -430
  132. package/themes/franchises/src/components/PaymentOptions/styles.tsx +0 -77
  133. package/themes/franchises/src/components/PhoneInputNumber/index.tsx +0 -127
  134. package/themes/franchises/src/components/PhoneInputNumber/styles.tsx +0 -3
  135. package/themes/franchises/src/components/PreviousOrders/index.tsx +0 -188
  136. package/themes/franchises/src/components/PreviousOrders/styles.tsx +0 -33
  137. package/themes/franchises/src/components/ProductForm/index.tsx +0 -695
  138. package/themes/franchises/src/components/ProductForm/styles.tsx +0 -78
  139. package/themes/franchises/src/components/ProductIngredient/index.tsx +0 -43
  140. package/themes/franchises/src/components/ProductIngredient/styles.tsx +0 -7
  141. package/themes/franchises/src/components/ProductItemAccordion/index.tsx +0 -276
  142. package/themes/franchises/src/components/ProductItemAccordion/styles.tsx +0 -57
  143. package/themes/franchises/src/components/ProductOption/index.tsx +0 -50
  144. package/themes/franchises/src/components/ProductOption/styles.tsx +0 -11
  145. package/themes/franchises/src/components/ProductOptionSubOption/index.tsx +0 -146
  146. package/themes/franchises/src/components/ProductOptionSubOption/styles.tsx +0 -32
  147. package/themes/franchises/src/components/ReviewDriver/index.tsx +0 -221
  148. package/themes/franchises/src/components/ReviewDriver/styles.tsx +0 -46
  149. package/themes/franchises/src/components/ReviewOrder/index.tsx +0 -325
  150. package/themes/franchises/src/components/ReviewOrder/styles.tsx +0 -46
  151. package/themes/franchises/src/components/ReviewProduct/index.tsx +0 -275
  152. package/themes/franchises/src/components/ReviewProduct/styles.tsx +0 -53
  153. package/themes/franchises/src/components/SearchBar/index.tsx +0 -139
  154. package/themes/franchises/src/components/SignupForm/index.tsx +0 -643
  155. package/themes/franchises/src/components/SignupForm/styles.tsx +0 -27
  156. package/themes/franchises/src/components/SingleProductCard/index.tsx +0 -124
  157. package/themes/franchises/src/components/SingleProductCard/styles.tsx +0 -23
  158. package/themes/franchises/src/components/StripeCardForm/index.tsx +0 -97
  159. package/themes/franchises/src/components/StripeCardForm/naked.tsx +0 -128
  160. package/themes/franchises/src/components/StripeCardForm/styles.tsx +0 -32
  161. package/themes/franchises/src/components/StripeCardsList/index.tsx +0 -182
  162. package/themes/franchises/src/components/StripeElementsForm/index.tsx +0 -204
  163. package/themes/franchises/src/components/StripeElementsForm/naked.tsx +0 -90
  164. package/themes/franchises/src/components/StripeElementsForm/styles.tsx +0 -13
  165. package/themes/franchises/src/components/StripeRedirectForm/index.tsx +0 -159
  166. package/themes/franchises/src/components/StripeRedirectForm/styles.tsx +0 -23
  167. package/themes/franchises/src/components/TagSelector/index.tsx +0 -94
  168. package/themes/franchises/src/components/TagSelector/styles.ts +0 -0
  169. package/themes/franchises/src/components/TaxInformation/index.tsx +0 -51
  170. package/themes/franchises/src/components/TaxInformation/styles.tsx +0 -9
  171. package/themes/franchises/src/components/UpsellingProducts/index.tsx +0 -222
  172. package/themes/franchises/src/components/UpsellingProducts/styles.tsx +0 -50
  173. package/themes/franchises/src/components/UserDetails/index.tsx +0 -134
  174. package/themes/franchises/src/components/UserDetails/styles.tsx +0 -26
  175. package/themes/franchises/src/components/UserFormDetails/index.tsx +0 -351
  176. package/themes/franchises/src/components/UserFormDetails/styles.tsx +0 -35
  177. package/themes/franchises/src/components/UserProfile/index.tsx +0 -179
  178. package/themes/franchises/src/components/UserProfile/styles.ts +0 -42
  179. package/themes/franchises/src/components/UserProfileForm/index.tsx +0 -253
  180. package/themes/franchises/src/components/UserProfileForm/styles.tsx +0 -29
  181. package/themes/franchises/src/components/VerifyPhone/index.tsx +0 -188
  182. package/themes/franchises/src/components/VerifyPhone/styles.tsx +0 -43
  183. package/themes/franchises/src/components/shared/OAlert.tsx +0 -55
  184. package/themes/franchises/src/components/shared/OBottomPopup.tsx +0 -73
  185. package/themes/franchises/src/components/shared/OBottomStickBar.tsx +0 -62
  186. package/themes/franchises/src/components/shared/OButton.tsx +0 -132
  187. package/themes/franchises/src/components/shared/ODropDown.tsx +0 -169
  188. package/themes/franchises/src/components/shared/OIcon.tsx +0 -53
  189. package/themes/franchises/src/components/shared/OIconButton.tsx +0 -127
  190. package/themes/franchises/src/components/shared/OIconText.tsx +0 -54
  191. package/themes/franchises/src/components/shared/OInput.tsx +0 -113
  192. package/themes/franchises/src/components/shared/OKeyButton.tsx +0 -35
  193. package/themes/franchises/src/components/shared/OModal.tsx +0 -172
  194. package/themes/franchises/src/components/shared/OText.tsx +0 -52
  195. package/themes/franchises/src/components/shared/OTextarea.tsx +0 -36
  196. package/themes/franchises/src/components/shared/OToast.tsx +0 -93
  197. package/themes/franchises/src/components/shared/OToggle.tsx +0 -158
  198. package/themes/franchises/src/components/shared/index.tsx +0 -29
  199. package/themes/franchises/src/config/constants.tsx +0 -57
  200. package/themes/franchises/src/layouts/Container.tsx +0 -23
  201. package/themes/franchises/src/layouts/SafeAreaContainer.tsx +0 -6
  202. package/themes/franchises/src/providers/AlertProvider.tsx +0 -43
  203. package/themes/franchises/src/providers/StoreUtil.tsx +0 -50
  204. package/themes/franchises/src/types/index.tsx +0 -445
  205. package/themes/franchises/src/utils/index.tsx +0 -222
@@ -1,134 +1,130 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { TouchableOpacity, View } from 'react-native';
1
+ import React, { useEffect } from 'react';
3
2
  import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
4
3
 
5
- import { UDContainer, UDHeader, UDForm, UDInfo, EditBtn } from './styles';
4
+ import { UDContainer, UDHeader, UDInfo, } from './styles';
6
5
 
7
6
  import {
8
- UserFormDetails as UserFormController,
9
- useLanguage,
10
- useSession,
7
+ UserFormDetails as UserFormController,
8
+ useLanguage,
9
+ useSession
11
10
  } from 'ordering-components/native';
12
- import { useTheme } from 'styled-components/native';
13
- import { OIcon, OText } from '../shared';
11
+
12
+ import { OText } from '../shared';
14
13
 
15
14
  import { UserFormDetailsUI } from '../UserFormDetails';
16
15
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
16
+ import { useTheme } from 'styled-components/native';
17
17
 
18
18
  const UserDetailsUI = (props: any) => {
19
- const {
20
- isEdit,
21
- formState,
22
- cleanFormState,
23
- cartStatus,
24
- toggleIsEdit,
25
- validationFields,
26
- isUserDetailsEdit,
27
- phoneUpdate,
28
- togglePhoneUpdate
29
- } = props
30
-
31
- const theme = useTheme();
19
+ const {
20
+ isEdit,
21
+ formState,
22
+ cleanFormState,
23
+ cartStatus,
24
+ toggleIsEdit,
25
+ validationFields,
26
+ isUserDetailsEdit,
27
+ phoneUpdate,
28
+ togglePhoneUpdate,
29
+ isCheckout
30
+ } = props
32
31
 
33
- const [, t] = useLanguage()
34
- const [{ user }] = useSession()
35
- const userData = props.userData || (!formState.result.error && formState.result?.result) || user
32
+ const theme = useTheme();
33
+ const [, t] = useLanguage()
34
+ const [{ user }] = useSession()
35
+ const userData = props.userData || (!formState.result.error && formState.result?.result) || user
36
36
 
37
37
 
38
- useEffect(() => {
39
- if (isUserDetailsEdit) {
40
- !isEdit && toggleIsEdit()
41
- }
42
- }, [isUserDetailsEdit])
38
+ useEffect(() => {
39
+ if (isUserDetailsEdit) {
40
+ !isEdit && toggleIsEdit()
41
+ }
42
+ }, [isUserDetailsEdit])
43
43
 
44
- const toggleEditState = () => {
45
- toggleIsEdit()
46
- cleanFormState({ changes: {} })
47
- }
44
+ const toggleEditState = () => {
45
+ toggleIsEdit()
46
+ cleanFormState({ changes: {} })
47
+ }
48
48
 
49
- useEffect(() => {
50
- if (user?.cellphone && !user?.country_phone_code) {
51
- togglePhoneUpdate(true)
52
- } else {
53
- togglePhoneUpdate(false)
54
- }
55
- }, [user?.country_phone_code])
49
+ useEffect(() => {
50
+ if (user?.cellphone && !user?.country_phone_code) {
51
+ togglePhoneUpdate(true)
52
+ } else {
53
+ togglePhoneUpdate(false)
54
+ }
55
+ }, [user?.country_phone_code])
56
56
 
57
- return (
58
- <>
59
- {(validationFields.loading || formState.loading) && (
60
- <Placeholder Animation={Fade}>
61
- <PlaceholderLine height={20} width={70} />
62
- <PlaceholderLine height={15} width={60} />
63
- <PlaceholderLine height={15} width={60} />
64
- <PlaceholderLine height={15} width={80} style={{ marginBottom: 20 }} />
65
- </Placeholder>
66
- )}
57
+ return (
58
+ <>
59
+ {(validationFields.loading || formState.loading) && (
60
+ <Placeholder Animation={Fade}>
61
+ <PlaceholderLine height={20} width={70} />
62
+ <PlaceholderLine height={15} width={60} />
63
+ <PlaceholderLine height={15} width={60} />
64
+ <PlaceholderLine height={15} width={80} style={{ marginBottom: 20 }} />
65
+ </Placeholder>
66
+ )}
67
67
 
68
- {!(validationFields.loading || formState.loading) && (
69
- <UDContainer>
70
- <UDHeader>
71
- <OText size={16} lineHeight={24} weight={'500'}>
72
- {t('CUSTOMER_DETAILS', 'Customer Details')}
73
- </OText>
74
- {cartStatus !== 2 && (
75
- !isEdit ? (
76
- <EditBtn onPress={() => toggleIsEdit()} activeOpacity={0.7}>
77
- <OIcon
78
- src={theme.images.general.pencil}
79
- width={16}
80
- height={16}
81
- color={theme.colors.editColor}
82
- style={{ marginBottom: 10, marginLeft: 5 }}
83
- />
84
- </EditBtn>
85
- ) : (
86
- <EditBtn onPress={() => toggleEditState()} activeOpacity={0.7}>
87
- <OIcon
88
- src={theme.images.general.close}
89
- color={theme.colors.cancelColor}
90
- width={16}
91
- height={16}
92
- style={{ marginBottom: 5, marginLeft: 5 }}
93
- />
94
- </EditBtn>
95
- )
96
- )}
97
- </UDHeader>
68
+ {!(validationFields.loading || formState.loading) && (
69
+ <UDContainer>
70
+ <UDHeader>
71
+ <OText size={16}>
72
+ {t('CUSTOMER_DETAILS', 'Customer Details')}
73
+ </OText>
74
+ {cartStatus !== 2 && (
75
+ !isEdit ? (
76
+ <MaterialIcon
77
+ name='pencil-outline'
78
+ size={22}
79
+ color={theme.colors.editColor}
80
+ style={{ marginBottom: 10, marginLeft: 5 }}
81
+ onPress={() => toggleIsEdit()}
82
+ />
83
+ ) : (
84
+ <MaterialIcon
85
+ name='cancel'
86
+ color={theme.colors.cancelColor}
87
+ size={20}
88
+ style={{ marginBottom: 5, marginLeft: 5 }}
89
+ onPress={() => toggleEditState()}
90
+ />
91
+ )
92
+ )}
93
+ </UDHeader>
98
94
 
99
- {!isEdit ? (
100
- <UDInfo>
101
- <OText size={12} lineHeight={18} weight={'400'}>
102
- {userData?.name} {userData?.middle_name} {userData?.lastname} {userData?.second_lastname}
103
- </OText>
104
- <OText size={12} lineHeight={18} weight={'400'}>
105
- {userData?.email}
106
- </OText>
107
- {!!(userData?.cellphone || user?.cellphone) && (
108
- <>
109
- <OText size={12} lineHeight={18} weight={'400'}>
110
- {(userData?.country_phone_code) && `+${(userData?.country_phone_code)} `}{(userData?.cellphone)}
111
- </OText>
112
- {!!phoneUpdate && (
113
- <OText color={theme.colors.error} style={{ textAlign: 'center' }}>{t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number')}</OText>
114
- )}
115
- </>
116
- )}
117
- </UDInfo>
118
- ) : (
119
- <UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} />
120
- )}
121
- </UDContainer>
122
- )}
123
- </>
124
- )
95
+ {!isEdit ? (
96
+ <UDInfo>
97
+ <OText size={12}>
98
+ {userData?.name} {userData?.middle_name} {userData?.lastname} {userData?.second_lastname}
99
+ </OText>
100
+ <OText size={12} numberOfLines={1}>
101
+ {userData?.email}
102
+ </OText>
103
+ {!!(userData?.cellphone || user?.cellphone) && (
104
+ <>
105
+ <OText size={12}>
106
+ {(userData?.country_phone_code) && `+${(userData?.country_phone_code)} `}{(userData?.cellphone)}
107
+ </OText>
108
+ {!!phoneUpdate && (
109
+ <OText color={theme.colors.error} style={{ textAlign: 'center', width: '100%'}}>{t('NECESSARY_UPDATE_COUNTRY_PHONE_CODE', 'It is necessary to update your phone number')}</OText>
110
+ )}
111
+ </>
112
+ )}
113
+ </UDInfo>
114
+ ) : (
115
+ <UserFormDetailsUI {...props} phoneUpdate={phoneUpdate} togglePhoneUpdate={togglePhoneUpdate} isCheckout={isCheckout} />
116
+ )}
117
+ </UDContainer>
118
+ )}
119
+ </>
120
+ )
125
121
  }
126
122
 
127
123
  export const UserDetails = (props: any) => {
128
- const userDetailsProps = {
129
- ...props,
130
- UIComponent: UserDetailsUI
131
- }
124
+ const userDetailsProps = {
125
+ ...props,
126
+ UIComponent: UserDetailsUI
127
+ }
132
128
 
133
- return <UserFormController {...userDetailsProps} />
129
+ return <UserFormController {...userDetailsProps} />
134
130
  }
@@ -1,15 +1,15 @@
1
- import styled, { css } from 'styled-components/native';
1
+ import styled from 'styled-components/native';
2
2
 
3
3
  export const UDContainer = styled.View``
4
4
 
5
5
  export const UDHeader = styled.View`
6
+ display: flex;
6
7
  flex-direction: row;
7
8
  align-items: center;
8
9
  `
9
10
 
10
11
  export const UDForm = styled.View`
11
12
  width: 100%;
12
- /* margin-top: 25px; */
13
13
  `
14
14
 
15
15
  export const UDInfo = styled.View`
@@ -17,10 +17,5 @@ export const UDInfo = styled.View`
17
17
  flex-direction: column;
18
18
  width: 100%;
19
19
  text-align: left;
20
+ align-items: flex-start;
20
21
  `
21
- export const EditBtn = styled.TouchableOpacity`
22
- align-items: center;
23
- justify-content: center;
24
- padding-top: 9px;
25
- width: 40px;
26
- `;