ordering-ui-react-native 0.16.54 → 0.16.55-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.
Files changed (202) hide show
  1. package/package.json +6 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +8 -14
  5. package/src/components/BusinessInformation/index.tsx +33 -4
  6. package/src/components/BusinessInformation/styles.tsx +2 -2
  7. package/src/components/BusinessProductsList/index.tsx +10 -10
  8. package/src/components/BusinessesListing/index.tsx +1 -1
  9. package/src/components/Checkout/index.tsx +2 -1
  10. package/src/components/LanguageSelector/index.tsx +21 -16
  11. package/src/components/Messages/index.tsx +2 -2
  12. package/src/components/NotificationSetting/index.tsx +85 -0
  13. package/src/components/OrdersOption/index.tsx +54 -56
  14. package/src/components/PaymentOptions/index.tsx +298 -345
  15. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  16. package/src/components/SingleProductReview/index.tsx +7 -4
  17. package/src/components/StripeElementsForm/index.tsx +25 -16
  18. package/src/components/VerifyPhone/styles.tsx +1 -2
  19. package/src/components/shared/OBottomPopup.tsx +6 -2
  20. package/src/components/shared/OToast.tsx +4 -4
  21. package/src/index.tsx +2 -0
  22. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  23. package/src/utils/index.tsx +2 -1
  24. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +260 -238
  25. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  26. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  27. package/themes/business/src/components/Chat/index.tsx +40 -32
  28. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  29. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  30. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  31. package/themes/business/src/components/MapView/index.tsx +12 -1
  32. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  33. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  34. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +40 -30
  35. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
  36. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  37. package/themes/business/src/components/OrdersOption/index.tsx +76 -77
  38. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  39. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  40. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  41. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  42. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  43. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  44. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  45. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  46. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  47. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  48. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  49. package/themes/business/src/components/PreviousOrders/index.tsx +440 -245
  50. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  51. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  52. package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
  53. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  54. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  55. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  56. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  57. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  58. package/themes/business/src/components/shared/OLink.tsx +24 -12
  59. package/themes/business/src/components/shared/OText.tsx +3 -2
  60. package/themes/business/src/types/index.tsx +25 -11
  61. package/themes/business/src/utils/index.tsx +10 -0
  62. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  63. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  64. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  66. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  67. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  68. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  69. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  70. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  71. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  72. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  73. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  74. package/themes/kiosk/src/types/index.d.ts +2 -0
  75. package/themes/original/index.tsx +8 -0
  76. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  77. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  78. package/themes/original/src/components/AddressList/index.tsx +1 -1
  79. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  80. package/themes/original/src/components/BusinessBasicInformation/index.tsx +53 -37
  81. package/themes/original/src/components/BusinessController/index.tsx +193 -91
  82. package/themes/original/src/components/BusinessController/styles.tsx +14 -9
  83. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  84. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  85. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  86. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  88. package/themes/original/src/components/BusinessListingSearch/index.tsx +85 -137
  89. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  90. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  91. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  92. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -61
  93. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  94. package/themes/original/src/components/BusinessProductsListing/index.tsx +184 -86
  95. package/themes/original/src/components/BusinessProductsListing/styles.tsx +14 -12
  96. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  97. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +28 -29
  98. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +137 -135
  99. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
  100. package/themes/original/src/components/BusinessesListing/index.tsx +17 -10
  101. package/themes/original/src/components/Cart/index.tsx +82 -15
  102. package/themes/original/src/components/Cart/styles.tsx +4 -0
  103. package/themes/original/src/components/CartContent/index.tsx +27 -17
  104. package/themes/original/src/components/CartContent/styles.tsx +1 -1
  105. package/themes/original/src/components/Checkout/index.tsx +115 -118
  106. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  107. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  108. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  109. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  110. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  111. package/themes/original/src/components/FavoriteList/index.tsx +69 -45
  112. package/themes/original/src/components/FloatingButton/index.tsx +0 -1
  113. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  114. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  115. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  116. package/themes/original/src/components/GoogleMap/index.tsx +10 -1
  117. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  118. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  119. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  120. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  121. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  122. package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
  123. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  124. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  125. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  126. package/themes/original/src/components/Messages/index.tsx +35 -20
  127. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  128. package/themes/original/src/components/MultiCart/index.tsx +63 -0
  129. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
  130. package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
  131. package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
  132. package/themes/original/src/components/MyOrders/index.tsx +89 -25
  133. package/themes/original/src/components/NavBar/index.tsx +11 -5
  134. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  135. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  136. package/themes/original/src/components/Notifications/index.tsx +148 -0
  137. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  138. package/themes/original/src/components/OrderDetails/index.tsx +132 -18
  139. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  140. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  141. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  142. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  143. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  144. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  145. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  146. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  147. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
  148. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  149. package/themes/original/src/components/OrdersOption/index.tsx +95 -55
  150. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  151. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  152. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  153. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  154. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  155. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  156. package/themes/original/src/components/ProductForm/index.tsx +367 -384
  157. package/themes/original/src/components/ProductForm/styles.tsx +7 -12
  158. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  159. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  160. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  161. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  162. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  163. package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
  164. package/themes/original/src/components/Promotions/index.tsx +232 -219
  165. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  166. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  167. package/themes/original/src/components/ReviewOrder/index.tsx +43 -11
  168. package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
  169. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  170. package/themes/original/src/components/ReviewTrigger/index.tsx +28 -10
  171. package/themes/original/src/components/ReviewTrigger/styles.tsx +10 -3
  172. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  173. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  174. package/themes/original/src/components/ServiceForm/index.tsx +330 -266
  175. package/themes/original/src/components/SignupForm/index.tsx +134 -89
  176. package/themes/original/src/components/SingleOrderCard/index.tsx +219 -129
  177. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  178. package/themes/original/src/components/SingleProductCard/index.tsx +120 -62
  179. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -9
  180. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  181. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  182. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  183. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  184. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  185. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  186. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  187. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  188. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  189. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  190. package/themes/original/src/components/Wallets/index.tsx +176 -164
  191. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  192. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  193. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  194. package/themes/original/src/components/shared/OBottomPopup.tsx +32 -21
  195. package/themes/original/src/components/shared/OButton.tsx +8 -3
  196. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  197. package/themes/original/src/components/shared/OInput.tsx +10 -1
  198. package/themes/original/src/layouts/Container.tsx +13 -9
  199. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  200. package/themes/original/src/types/index.tsx +63 -8
  201. package/themes/original/src/utils/index.tsx +103 -58
  202. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -11,6 +11,8 @@ import { StyleSheet } from 'react-native';
11
11
  import { useTheme } from 'styled-components/native';
12
12
  import { shape } from '../../utils'
13
13
  import { CategoryDescriptionMemoized } from './CategoryDescription';
14
+ import { OrderItAgain } from '../OrderItAgain'
15
+ import { SubcategoriesComponentMemoized } from './SubcategoriesComponent';
14
16
 
15
17
  const BusinessProductsListUI = (props: BusinessProductsListParams) => {
16
18
  const {
@@ -35,7 +37,9 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
35
37
  onClickCategory,
36
38
  lazyLoadProductsRecommended,
37
39
  handleUpdateProducts,
38
- isFiltMode
40
+ previouslyProducts,
41
+ isFiltMode,
42
+ navigation
39
43
  } = props;
40
44
 
41
45
  const [, t] = useLanguage();
@@ -67,51 +71,29 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
67
71
  }
68
72
  }
69
73
 
70
- const SubcategoriesComponent = ({ category }: any) => {
71
- const allsubcategorySelected = !subcategoriesSelected?.some((subcategory: any) => category?.id === subcategory?.parent_category_id)
72
-
73
- return (
74
- <SubCategoriesContainer>
75
- <ContainerButton
76
- isSelected={allsubcategorySelected}
77
- >
78
- <OButton
79
- onClick={() => onClickSubcategory(null, category)}
80
- bgColor={allsubcategorySelected ? theme.colors.primary : theme.colors.backgroundGray}
81
- text={`${t('ALL', 'All')} ${allsubcategorySelected ? 'X' : ''}`}
82
- style={bpStyles.categoryButtonStyle}
83
- textStyle={{ color: allsubcategorySelected ? theme.colors.white : theme.colors.textNormal, fontSize: 12 }}
84
- />
85
- </ContainerButton>
86
- {category?.subcategories?.map((subcategory: any) => {
87
- const isSubcategorySelected = subcategoriesSelected?.find((_subcategory: any) => _subcategory?.id === subcategory?.id)
88
- return (
89
- <ContainerButton
90
- key={subcategory?.id}
91
- isSelected={isSubcategorySelected}
92
- >
93
- <OButton
94
- onClick={() => onClickSubcategory(subcategory, category)}
95
- bgColor={isSubcategorySelected ? theme.colors.primary : theme.colors.backgroundGray}
96
- text={`${subcategory?.name} ${isSubcategorySelected ? 'X' : ''}`}
97
- style={bpStyles.categoryButtonStyle}
98
- textStyle={{ color: isSubcategorySelected ? theme.colors.white : theme.colors.textNormal, fontSize: 12 }}
99
- />
100
- </ContainerButton>
101
- )
102
- }
103
- )}
104
- </SubCategoriesContainer>
105
- )
106
- }
107
-
108
74
  return (
109
75
  <ProductsContainer renderToHardwareTextureAndroid={categoryState.loading || isBusinessLoading}>
110
76
  <HeaderWrapper>
111
77
  {category?.subcategories?.length > 0 && (
112
- <SubcategoriesComponent category={category} />
78
+ <SubcategoriesComponentMemoized
79
+ category={category}
80
+ subcategoriesSelected={subcategoriesSelected}
81
+ onClickSubcategory={onClickSubcategory}
82
+ />
113
83
  )}
114
84
  </HeaderWrapper>
85
+ {previouslyProducts?.length > 0 && (
86
+ <OrderItAgain
87
+ onProductClick={onProductClick}
88
+ productList={previouslyProducts}
89
+ businessId={businessId}
90
+ categoryState={categoryState}
91
+ navigation={navigation}
92
+ handleUpdateProducts={handleUpdateProducts}
93
+ currentCart={currentCart}
94
+ searchValue={searchValue}
95
+ />
96
+ )}
115
97
  {category.id &&
116
98
  categoryState.products
117
99
  ?.filter((product: any) =>
@@ -122,12 +104,14 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
122
104
  <SingleProductCard
123
105
  key={'prod_' + product.id + `_${i}`}
124
106
  isSoldOut={product.inventoried && !product.quantity}
107
+ enableIntersection={!isFiltMode && categoryState.products?.length < 80}
125
108
  product={product}
126
109
  businessId={businessId}
127
110
  categoryState={categoryState}
128
111
  onProductClick={() => onProductClick(product)}
129
112
  productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
130
113
  handleUpdateProducts={handleUpdateProducts}
114
+ navigation={navigation}
131
115
  />
132
116
  ))
133
117
  }
@@ -148,11 +132,13 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
148
132
  key={'feat_' + product.id + `_${i}`}
149
133
  isSoldOut={product.inventoried && !product.quantity}
150
134
  product={product}
135
+ enableIntersection={!isFiltMode && categoryState.products?.length < 80}
151
136
  businessId={businessId}
152
137
  categoryState={categoryState}
153
138
  onProductClick={onProductClick}
154
139
  handleUpdateProducts={handleUpdateProducts}
155
140
  productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
141
+ navigation={navigation}
156
142
  />
157
143
  ),
158
144
  )}
@@ -180,14 +166,16 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
180
166
  style={bpStyles.catWrap}
181
167
  onLayout={(event: any) => handleOnLayout(event, category.id)}
182
168
  >
183
- <View style={bpStyles.catIcon}>
184
- <OIcon
185
- url={optimizeImage(category.image, 'h_250,c_limit')}
186
- width={41}
187
- height={41}
188
- style={{ borderRadius: 7.6 }}
189
- />
190
- </View>
169
+ {!!category.image && (
170
+ <View style={bpStyles.catIcon}>
171
+ <OIcon
172
+ url={optimizeImage(category.image, 'h_250,c_limit')}
173
+ width={41}
174
+ height={41}
175
+ style={{ borderRadius: 7.6 }}
176
+ />
177
+ </View>
178
+ )}
191
179
  <OText size={16} weight="600">
192
180
  {category.name}
193
181
  </OText>
@@ -233,19 +221,24 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
233
221
  </View>
234
222
  )}
235
223
  {category?.subcategories?.length > 0 && !isFiltMode && (
236
- <SubcategoriesComponent category={category} />
224
+ <SubcategoriesComponentMemoized
225
+ category={category}
226
+ subcategoriesSelected={subcategoriesSelected}
227
+ onClickSubcategory={onClickSubcategory}
228
+ />
237
229
  )}
238
230
  <>
239
231
  {products.sort((a: any, b: any) => a.rank - b.rank).map((product: any, i: any) => (
240
232
  <SingleProductCard
241
233
  key={`${product?.id}_${i}`}
242
- enableIntersection
234
+ enableIntersection={!isFiltMode && categoryState.products?.length < 80}
243
235
  isSoldOut={product.inventoried && !product.quantity}
244
236
  businessId={businessId}
245
237
  product={product}
246
238
  categoryState={categoryState}
247
239
  onProductClick={onProductClick}
248
240
  handleUpdateProducts={handleUpdateProducts}
241
+ navigation={navigation}
249
242
  productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
250
243
  />
251
244
  ))}
@@ -260,19 +253,24 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
260
253
  <>
261
254
  {[...Array(categoryState?.pagination?.nextPageItems).keys()].map(
262
255
  (item, i) => (
263
- <Placeholder key={i} style={{ padding: 5 }} Animation={Fade}>
264
- <View style={{ flexDirection: 'row' }}>
256
+ <View style={{ minHeight: 165, marginBottom: 28, padding: 12 }} key={i}>
257
+ <Placeholder style={{ padding: 5 }} Animation={Fade}>
258
+ <View style={{ flexDirection: 'row' }}>
259
+ <Placeholder style={{ paddingVertical: 10, flex: 1 }}>
260
+ <PlaceholderLine width={60} style={{ marginBottom: 15 }} />
261
+ <PlaceholderLine width={20} />
262
+ </Placeholder>
263
+ <PlaceholderLine
264
+ width={24}
265
+ height={70}
266
+ style={{ marginLeft: 10, marginBottom: 10 }}
267
+ />
268
+ </View>
265
269
  <PlaceholderLine
266
- width={24}
267
- height={70}
268
- style={{ marginRight: 10, marginBottom: 10 }}
270
+ height={52}
269
271
  />
270
- <Placeholder style={{ paddingVertical: 10 }}>
271
- <PlaceholderLine width={60} style={{ marginBottom: 25 }} />
272
- <PlaceholderLine width={20} />
273
- </Placeholder>
274
- </View>
275
- </Placeholder>
272
+ </Placeholder>
273
+ </View>
276
274
  ),
277
275
  )}
278
276
  </>
@@ -18,15 +18,12 @@ export const RibbonBox = styled.View`
18
18
  background-color: ${(props: any) => props.theme.colors.primary};
19
19
  padding: 2px 8px;
20
20
  max-width: 180px;
21
-
22
21
  ${(props: any) => props.bgColor && css`
23
22
  background-color: ${props.bgColor};
24
23
  `}
25
-
26
24
  ${(props: any) => props.isRoundRect && css`
27
25
  border-radius: 7.6px;
28
26
  `}
29
-
30
27
  ${(props: any) => props.isCapsule && css`
31
28
  border-radius: 50px;
32
29
  `}
@@ -1,5 +1,7 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from 'react'
2
2
  import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView } from 'react-native'
3
+ import { IOScrollView } from 'react-native-intersection-observer'
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context'
3
5
  import { useTheme } from 'styled-components/native';
4
6
  import {
5
7
  BusinessAndProductList,
@@ -9,9 +11,9 @@ import {
9
11
  useUtils,
10
12
  ToastType,
11
13
  useToast,
12
- useConfig,
13
- useOrderingTheme
14
+ useConfig
14
15
  } from 'ordering-components/native'
16
+ import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
15
17
  import { OButton, OIcon, OModal, OText } from '../shared'
16
18
  import Alert from '../../providers/AlertProvider'
17
19
  import { BusinessBasicInformation } from '../BusinessBasicInformation'
@@ -20,16 +22,19 @@ import { BusinessProductsCategories } from '../BusinessProductsCategories'
20
22
  import { BusinessProductsList } from '../BusinessProductsList'
21
23
  import { BusinessProductsListingParams } from '../../types'
22
24
  import { _retrieveStoreData, _removeStoreData } from '../../providers/StoreUtil';
25
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
26
+ import { useIsFocused } from '@react-navigation/native';
27
+
23
28
  import {
24
29
  TopHeader,
25
30
  WrapSearchBar,
26
31
  WrapContent,
27
- BusinessProductsListingContainer,
28
32
  FiltProductsContainer,
29
33
  ContainerSafeAreaView,
30
34
  BackgroundGray,
31
35
  ProfessionalFilterWrapper,
32
- NearBusiness
36
+ NearBusiness,
37
+ TopActions
33
38
  } from './styles'
34
39
  import { FloatingButton } from '../FloatingButton'
35
40
  import { UpsellingRedirect } from './UpsellingRedirect'
@@ -61,27 +66,29 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
61
66
  getNextProducts,
62
67
  handleUpdateProducts,
63
68
  professionalSelected,
69
+ handleUpdateProfessionals,
64
70
  handleChangeProfessionalSelected,
65
71
  onBusinessClick
66
72
  } = props
67
73
 
74
+ const insets = useSafeAreaInsets()
68
75
  const theme = useTheme();
69
- const [orderingTheme] = useOrderingTheme()
70
76
  const [, t] = useLanguage()
71
77
  const [{ auth }] = useSession()
72
- const [orderState, { clearCart }] = useOrder()
78
+ const [orderState, { addProduct, updateProduct }] = useOrder()
73
79
  const [{ parsePrice }] = useUtils()
74
80
  const [, { showToast }] = useToast()
75
81
  const [{ configs }] = useConfig()
82
+ const isFocused = useIsFocused();
76
83
  const isPreOrder = configs?.preorder_status_enabled?.value === '1'
77
84
 
78
- const isChewLayout = theme?.layouts?.business_view?.components?.header?.components?.layout?.type === 'chew'
79
- const showLogo = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
80
- const showBusinessNearCity = !theme?.layouts?.business_view?.components?.near_business?.hidden
85
+ const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
86
+ const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
87
+ const hideBusinessNearCity = theme?.business_view?.components?.near_business?.hidden ?? true
81
88
 
82
89
  const styles = StyleSheet.create({
83
90
  mainContainer: {
84
- flex: 1,
91
+ flex: 1
85
92
  },
86
93
  BackIcon: {
87
94
  paddingRight: 20,
@@ -103,7 +110,13 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
103
110
  padding: 15,
104
111
  justifyContent: 'center',
105
112
  shadowColor: theme.colors.clear,
106
- }
113
+ },
114
+ businessSkeleton: {
115
+ borderRadius: 8,
116
+ marginRight: 20,
117
+ width: 56,
118
+ height: 56
119
+ },
107
120
  })
108
121
 
109
122
  const { business, loading, error } = businessState
@@ -118,26 +131,51 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
118
131
  const [subcategoriesSelected, setSubcategoriesSelected] = useState([])
119
132
  const [openService, setOpenService] = useState(false)
120
133
  const [currentProduct, setCurrentProduct] = useState(null)
134
+ const [searchBarHeight, setSearchBarHeight] = useState(60)
121
135
 
122
136
  const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
137
+ const isQuickAddProduct = configs?.add_product_with_one_click?.value === '1'
138
+ const openCarts = (Object.values(orderState?.carts)?.filter((cart: any) => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && !cart?.wallets) || null) || []
139
+
123
140
  const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
124
141
  const isOpenFiltProducts = isOpenSearchBar && !!searchValue
125
- const filtProductsHeight = Platform.OS === 'ios' ? 0 : 35
142
+ const filtProductsHeight = Platform.OS === 'ios' ? 0 : 100
126
143
  const onRedirect = (route: string, params?: any) => {
127
144
  navigation.navigate(route, params)
128
145
  }
129
-
130
- const onProductClick = (product: any) => {
131
- if (product?.type === 'service' && professionalSelected) {
132
- setCurrentProduct(product)
133
- setOpenService(true)
134
- return
146
+ const onProductClick = async (product: any) => {
147
+ if (product.extras.length === 0 && !product.inventoried && auth && isQuickAddProduct) {
148
+ const isProductAddedToCart = currentCart?.products?.find((Cproduct: any) => Cproduct.id === product.id)
149
+ const productQuantity = isProductAddedToCart?.quantity
150
+ const addCurrentProduct = {
151
+ ...product,
152
+ quantity: 1
153
+ }
154
+ const updateCurrentProduct = {
155
+ id: product.id,
156
+ code: isProductAddedToCart?.code,
157
+ quantity: productQuantity + 1
158
+ }
159
+ const cartData = currentCart?.business_id ? currentCart : { business_id: business.id }
160
+ if (isProductAddedToCart) {
161
+ await updateProduct(updateCurrentProduct, cartData, isQuickAddProduct)
162
+ } else {
163
+ await addProduct(addCurrentProduct, cartData, isQuickAddProduct)
164
+ }
165
+ } else {
166
+ const productAddedToCartLength = currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0) || 0
167
+ if (product?.type === 'service' && business?.professionals?.length > 0) {
168
+ setCurrentProduct(product)
169
+ setOpenService(true)
170
+ return
171
+ }
172
+ onRedirect('ProductDetails', {
173
+ product: product,
174
+ businessSlug: business.slug,
175
+ businessId: business.id,
176
+ productAddedToCartLength
177
+ })
135
178
  }
136
- onRedirect('ProductDetails', {
137
- product: product,
138
- businessSlug: business.slug,
139
- businessId: business.id,
140
- })
141
179
  }
142
180
 
143
181
  const handleCancel = () => {
@@ -146,7 +184,36 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
146
184
  }
147
185
 
148
186
  const handleUpsellingPage = () => {
149
- if (isCheckoutMultiBusinessEnabled) {
187
+ setOpenUpselling(false)
188
+ setCanOpenUpselling(false)
189
+ const cartSelectedHasGroup = currentCart?.group?.uuid
190
+ const cartFilterValidation = (cart: any) => cart?.valid && cart?.status !== 2
191
+ const cartsGroupLength = cartSelectedHasGroup ? Object.values(orderState.carts).filter((_cart: any) => _cart?.group?.uuid === cartSelectedHasGroup && cartFilterValidation(_cart))?.length : 0
192
+ if (cartsGroupLength > 1 && isCheckoutMultiBusinessEnabled) {
193
+ props.onNavigationRedirect('CheckoutNavigator', {
194
+ screen: 'MultiCheckout',
195
+ cartUuid: currentCart?.group?.uuid
196
+ })
197
+ return
198
+ }
199
+ const cartGroupsCount: any = {}
200
+ Object.values(orderState.carts).filter(_cart => cartFilterValidation(_cart))?.forEach((_cart: any) => {
201
+ if (cartGroupsCount[_cart?.group?.uuid]) {
202
+ cartGroupsCount[_cart?.group?.uuid] += 1
203
+ } else {
204
+ cartGroupsCount[_cart?.group?.uuid] = 1
205
+ }
206
+ })
207
+ let groupForTheCart
208
+ const groupForAddCartArray = Object.keys(cartGroupsCount).filter(cartGroupUuid => cartGroupsCount[cartGroupUuid] > 0 && cartGroupsCount[cartGroupUuid] < 5)
209
+ const max = Math.max(...groupForAddCartArray.map(uuid => cartGroupsCount[uuid]))
210
+ const indexes = groupForAddCartArray.filter(uuid => cartGroupsCount[uuid] === max)
211
+ if (indexes?.length > 1) {
212
+ groupForTheCart = indexes.find(uuid => uuid !== 'undefined')
213
+ } else {
214
+ groupForTheCart = indexes[0]
215
+ }
216
+ if (isCheckoutMultiBusinessEnabled && openCarts.length > 1) {
150
217
  onRedirect('CheckoutNavigator', {
151
218
  screen: 'MultiCheckout'
152
219
  })
@@ -231,33 +298,41 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
231
298
  removeCartByReOrder()
232
299
  }, [currentCart])
233
300
 
301
+ useEffect(() => {
302
+ if (!isFocused) {
303
+ handleChangeSearch('')
304
+ setIsOpenSearchBar(false)
305
+ }
306
+ }, [isFocused])
307
+
308
+ const subtotalWithTaxes = currentCart?.taxes?.reduce((acc: any, item: any) => {
309
+ if (item?.type === 1)
310
+ return acc = acc + item?.summary?.tax
311
+ return acc = acc
312
+ }, currentCart?.subtotal)
313
+
234
314
  return (
235
315
  <>
236
- <ContainerSafeAreaView
237
- style={{ flex: 1 }}
238
- isOpenFiltProducts={isOpenFiltProducts}
239
- >
316
+ <View style={{ flex: 1 }}>
240
317
  <Animated.View style={{ position: 'relative' }}>
241
- <TopHeader isIos={Platform.OS === 'ios'}>
318
+ <TopHeader
319
+ style={{
320
+ marginTop: Platform.OS === 'ios' ? insets.top : 0
321
+ }}
322
+ onLayout={(event: any) => setSearchBarHeight(event.nativeEvent.layout.height)}
323
+ >
242
324
  {!isOpenSearchBar && (
243
325
  <>
244
- <View style={{ ...styles.headerItem, flex: 1 }}>
245
- <OButton
246
- imgLeftSrc={theme.images.general.arrow_left}
247
- imgRightSrc={null}
248
- style={styles.btnBackArrow}
249
- onClick={() => handleBackNavigation()}
250
- imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 30 }}
251
- />
252
-
253
- </View>
326
+ <TopActions onPress={() => handleBackNavigation()}>
327
+ <OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
328
+ </TopActions>
254
329
  {!errorQuantityProducts && (
255
330
  <View style={{ ...styles.headerItem }}>
256
331
  <TouchableOpacity
257
332
  onPress={() => setIsOpenSearchBar(true)}
258
333
  style={styles.searchIcon}
259
334
  >
260
- <OIcon src={theme.images.general.search} color={theme.colors.textNormal} width={16} />
335
+ <OIcon src={theme.images.general.search} color={theme.colors.textNormal} width={20} />
261
336
  </TouchableOpacity>
262
337
  </View>
263
338
  )}
@@ -277,7 +352,20 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
277
352
  </WrapSearchBar>
278
353
  )}
279
354
  </TopHeader>
280
- {showBusinessNearCity && (
355
+ {!hideBusinessNearCity && loading && (
356
+ <NearBusiness style={{ paddingBottom: 10 }}>
357
+ <Placeholder Animation={Fade}>
358
+ <View style={{ flexDirection: 'row' }}>
359
+ {[...Array(10).keys()].map(i => (
360
+ <View style={styles.businessSkeleton} key={i}>
361
+ <PlaceholderLine style={{ width: '100%', height: '100%' }} />
362
+ </View>
363
+ ))}
364
+ </View>
365
+ </Placeholder>
366
+ </NearBusiness>
367
+ )}
368
+ {!loading && !hideBusinessNearCity && businessState?.business?.city_id && (
281
369
  <NearBusiness>
282
370
  <BusinessesListing
283
371
  logosLayout
@@ -292,10 +380,11 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
292
380
 
293
381
  {business?.categories?.length > 0 && isOpenFiltProducts && (
294
382
  <FiltProductsContainer
295
- isIos={Platform.OS === 'ios'}
296
383
  style={{
297
- height: Dimensions.get('window').height - filtProductsHeight
384
+ height: Dimensions.get('window').height - filtProductsHeight,
385
+ top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
298
386
  }}
387
+ contentContainerStyle={{ flexGrow: 1 }}
299
388
  >
300
389
  <View style={{ padding: 20, backgroundColor: theme.colors.white }}>
301
390
  <BusinessProductsList
@@ -323,22 +412,28 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
323
412
  setSubcategoriesSelected={setSubcategoriesSelected}
324
413
  onClickCategory={handleChangeCategory}
325
414
  handleUpdateProducts={handleUpdateProducts}
415
+ previouslyProducts={business?.previously_products}
416
+ navigation={navigation}
326
417
  isFiltMode
327
418
  />
328
419
  </View>
329
420
  </FiltProductsContainer>
330
421
  )}
331
422
  {isOpenFiltProducts && (
332
- <BackgroundGray />
423
+ <BackgroundGray isIos={Platform.OS === 'ios'} />
333
424
  )}
334
- <BusinessProductsListingContainer
335
- stickyHeaderIndices={[2]}
336
- style={styles.mainContainer}
425
+ <IOScrollView
426
+ stickyHeaderIndices={[business?.professionals?.length > 0 ? 3 : 2]}
427
+ style={{
428
+ ...styles.mainContainer,
429
+ marginBottom: currentCart?.products?.length > 0 && categoryState.products.length !== 0 ?
430
+ 50 : 0
431
+ }}
337
432
  ref={scrollViewRef}
338
- isActiveFloatingButtom={currentCart?.products?.length > 0 && categoryState.products.length !== 0}
339
433
  onScroll={handlePageScroll}
340
434
  onScrollBeginDrag={handleTouchDrag}
341
435
  scrollEventThrottle={16}
436
+ bounces={false}
342
437
  >
343
438
  <BusinessBasicInformation
344
439
  navigation={navigation}
@@ -371,31 +466,27 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
371
466
  marginTop: isChewLayout && showLogo ? 10 : 0
372
467
  }}
373
468
  />
374
- {!loading && business?.id && (
375
- <>
376
- {!(business?.categories?.length === 0) && (
377
- <BusinessProductsCategories
378
- categories={[{ id: null, name: t('ALL', 'All') }, { id: 'featured', name: t('FEATURED', 'Featured') }, ...business?.categories.sort((a: any, b: any) => a.rank - b.rank)]}
379
- categorySelected={categorySelected}
380
- onClickCategory={handleChangeCategory}
381
- featured={featuredProducts}
382
- openBusinessInformation={openBusinessInformation}
383
- scrollViewRef={scrollViewRef}
384
- productListLayout={productListLayout}
385
- categoriesLayout={categoriesLayout}
386
- selectedCategoryId={selectedCategoryId}
387
- lazyLoadProductsRecommended={business?.lazy_load_products_recommended}
388
- setSelectedCategoryId={setSelectedCategoryId}
389
- setCategoryClicked={setCategoryClicked}
390
-
391
- />
392
- )}
393
- </>
469
+ {!loading && business?.id && !(business?.categories?.length === 0) && (
470
+ <BusinessProductsCategories
471
+ categories={[{ id: null, name: t('ALL', 'All') }, { id: 'featured', name: t('FEATURED', 'Featured') }, ...business?.categories.sort((a: any, b: any) => a.rank - b.rank)]}
472
+ categorySelected={categorySelected}
473
+ onClickCategory={handleChangeCategory}
474
+ featured={featuredProducts}
475
+ openBusinessInformation={openBusinessInformation}
476
+ scrollViewRef={scrollViewRef}
477
+ productListLayout={productListLayout}
478
+ categoriesLayout={categoriesLayout}
479
+ selectedCategoryId={selectedCategoryId}
480
+ lazyLoadProductsRecommended={business?.lazy_load_products_recommended}
481
+ setSelectedCategoryId={setSelectedCategoryId}
482
+ setCategoryClicked={setCategoryClicked}
483
+ />
394
484
  )}
395
485
  {!loading && business?.id && (
396
486
  <>
397
487
  <WrapContent
398
488
  onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
489
+ style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
399
490
  >
400
491
  <BusinessProductsList
401
492
  categories={[
@@ -422,6 +513,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
422
513
  setSubcategoriesSelected={setSubcategoriesSelected}
423
514
  onClickCategory={handleChangeCategory}
424
515
  handleUpdateProducts={handleUpdateProducts}
516
+ navigation={navigation}
517
+ previouslyProducts={business?.previously_products}
425
518
  />
426
519
  </WrapContent>
427
520
  </>
@@ -444,28 +537,31 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
444
537
  isBusinessLoading={loading}
445
538
  errorQuantityProducts={errorQuantityProducts}
446
539
  handleUpdateProducts={handleUpdateProducts}
540
+ navigation={navigation}
447
541
  />
448
542
  </WrapContent>
449
543
  </>
450
544
  )}
451
- </BusinessProductsListingContainer>
545
+ </IOScrollView>
452
546
  {!loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0 && (
453
- <FloatingButton
454
- btnText={
455
- openUpselling
456
- ? t('LOADING', 'Loading')
457
- : currentCart?.subtotal >= currentCart?.minimum
458
- ? t('VIEW_ORDER', 'View Order')
459
- : `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(currentCart?.minimum)}`
460
- }
461
- isSecondaryBtn={currentCart?.subtotal < currentCart?.minimum || openUpselling}
462
- btnLeftValueShow={currentCart?.subtotal >= currentCart?.minimum && currentCart?.products?.length > 0}
463
- btnRightValueShow={currentCart?.subtotal >= currentCart?.minimum && currentCart?.products?.length > 0}
464
- btnLeftValue={currentCart?.products.reduce((prev: number, product: any) => prev + product.quantity, 0)}
465
- btnRightValue={parsePrice(currentCart?.total)}
466
- disabled={currentCart?.subtotal < currentCart?.minimum || openUpselling}
467
- handleClick={() => setOpenUpselling(true)}
468
- />
547
+ <View style={{ marginBottom: Platform.OS === 'ios' ? 20 : 0 }}>
548
+ <FloatingButton
549
+ btnText={
550
+ openUpselling
551
+ ? t('LOADING', 'Loading')
552
+ : subtotalWithTaxes >= currentCart?.minimum
553
+ ? t('VIEW_ORDER', 'View Order')
554
+ : `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(currentCart?.minimum)}`
555
+ }
556
+ isSecondaryBtn={subtotalWithTaxes < currentCart?.minimum || openUpselling}
557
+ btnLeftValueShow={subtotalWithTaxes >= currentCart?.minimum && currentCart?.products?.length > 0}
558
+ btnRightValueShow={subtotalWithTaxes >= currentCart?.minimum && currentCart?.products?.length > 0}
559
+ btnLeftValue={currentCart?.products.reduce((prev: number, product: any) => prev + product.quantity, 0)}
560
+ btnRightValue={parsePrice(currentCart?.total)}
561
+ disabled={subtotalWithTaxes < currentCart?.minimum || openUpselling}
562
+ handleClick={() => setOpenUpselling(true)}
563
+ />
564
+ </View>
469
565
  )}
470
566
  {openUpselling && (
471
567
  <UpsellingRedirect
@@ -489,7 +585,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
489
585
  onAccept={() => setAlertState({ open: false, content: [] })}
490
586
  onClose={() => setAlertState({ open: false, content: [] })}
491
587
  />
492
- </ContainerSafeAreaView>
588
+ </View>
493
589
  <OModal
494
590
  open={openService}
495
591
  onClose={() => setOpenService(false)}
@@ -503,6 +599,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
503
599
  professionalList={business?.professionals}
504
600
  professionalSelected={professionalSelected}
505
601
  handleChangeProfessional={handleChangeProfessionalSelected}
602
+ handleUpdateProfessionals={handleUpdateProfessionals}
506
603
  onSave={() => setOpenService(false)}
507
604
  onClose={() => setOpenService(false)}
508
605
  />
@@ -514,6 +611,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
514
611
  export const BusinessProductsListing = (props: BusinessProductsListingParams) => {
515
612
  const businessProductslistingProps = {
516
613
  ...props,
614
+ isForceSearch: Platform.OS === 'ios',
517
615
  UIComponent: BusinessProductsListingUI
518
616
  }
519
617
  return (