ordering-ui-react-native 0.16.40 → 0.16.41-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 +7 -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/BusinessBasicInformation/index.tsx +11 -19
  6. package/src/components/BusinessInformation/index.tsx +33 -4
  7. package/src/components/BusinessInformation/styles.tsx +2 -2
  8. package/src/components/BusinessProductsList/index.tsx +10 -10
  9. package/src/components/BusinessesListing/index.tsx +1 -1
  10. package/src/components/Checkout/index.tsx +2 -1
  11. package/src/components/LanguageSelector/index.tsx +21 -16
  12. package/src/components/LoginForm/index.tsx +15 -0
  13. package/src/components/Messages/index.tsx +2 -2
  14. package/src/components/NotificationSetting/index.tsx +85 -0
  15. package/src/components/OrdersOption/index.tsx +54 -56
  16. package/src/components/PaymentOptions/index.tsx +298 -345
  17. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  18. package/src/components/ReviewDriver/index.tsx +1 -1
  19. package/src/components/ReviewOrder/index.tsx +1 -1
  20. package/src/components/ReviewProducts/index.tsx +11 -0
  21. package/src/components/SignupForm/index.tsx +15 -0
  22. package/src/components/SingleProductReview/index.tsx +8 -5
  23. package/src/components/StripeElementsForm/index.tsx +25 -16
  24. package/src/components/VerifyPhone/styles.tsx +1 -2
  25. package/src/components/shared/OBottomPopup.tsx +6 -2
  26. package/src/index.tsx +2 -0
  27. package/src/pages/BusinessesListing.tsx +7 -6
  28. package/src/pages/OrderDetails.tsx +1 -1
  29. package/src/pages/ReviewDriver.tsx +2 -2
  30. package/src/pages/ReviewOrder.tsx +2 -2
  31. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  32. package/src/utils/index.tsx +2 -1
  33. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  34. package/themes/business/src/components/Chat/index.tsx +40 -32
  35. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  36. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  37. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  38. package/themes/business/src/components/MapView/index.tsx +12 -1
  39. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  40. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  41. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  42. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  43. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  44. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  45. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  46. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  47. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  48. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  49. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  50. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  51. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  52. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  53. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  54. package/themes/business/src/components/PreviousOrders/index.tsx +22 -24
  55. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  56. package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
  57. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  58. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  59. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  60. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  61. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  62. package/themes/business/src/types/index.tsx +15 -9
  63. package/themes/business/src/utils/index.tsx +10 -0
  64. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  66. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  67. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  68. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  69. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  70. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  71. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  72. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  73. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  74. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  75. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  76. package/themes/kiosk/src/types/index.d.ts +2 -0
  77. package/themes/original/index.tsx +4 -0
  78. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  79. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  80. package/themes/original/src/components/AddressList/index.tsx +1 -1
  81. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  82. package/themes/original/src/components/BusinessBasicInformation/index.tsx +260 -176
  83. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
  84. package/themes/original/src/components/BusinessController/index.tsx +216 -113
  85. package/themes/original/src/components/BusinessController/styles.tsx +1 -8
  86. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  87. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  88. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  89. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  90. package/themes/original/src/components/BusinessListingSearch/index.tsx +109 -139
  91. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  92. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  93. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  94. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -60
  95. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  96. package/themes/original/src/components/BusinessProductsListing/index.tsx +210 -115
  97. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
  98. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  99. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  100. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
  101. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
  102. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +260 -109
  103. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
  104. package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
  105. package/themes/original/src/components/Cart/index.tsx +53 -15
  106. package/themes/original/src/components/Cart/styles.tsx +4 -0
  107. package/themes/original/src/components/CartContent/index.tsx +22 -16
  108. package/themes/original/src/components/Checkout/index.tsx +114 -118
  109. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  110. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  111. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  112. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  113. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  114. package/themes/original/src/components/FavoriteList/index.tsx +19 -0
  115. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  116. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  117. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  118. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  119. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  120. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  121. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  122. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  123. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  124. package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -73
  125. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  126. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  127. package/themes/original/src/components/Messages/index.tsx +20 -20
  128. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  129. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  130. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  131. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  132. package/themes/original/src/components/MyOrders/index.tsx +88 -22
  133. package/themes/original/src/components/NavBar/index.tsx +15 -9
  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 +17 -0
  138. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  139. package/themes/original/src/components/OrderDetails/index.tsx +200 -37
  140. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  141. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  142. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  143. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  144. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  145. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  146. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  147. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  148. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
  149. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  150. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  151. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  152. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  153. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  154. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  155. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  156. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  157. package/themes/original/src/components/ProductForm/index.tsx +639 -664
  158. package/themes/original/src/components/ProductForm/styles.tsx +10 -11
  159. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  160. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  161. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  162. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  163. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  164. package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
  165. package/themes/original/src/components/Promotions/index.tsx +232 -219
  166. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  167. package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
  168. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  169. package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
  170. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  171. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  172. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  173. package/themes/original/src/components/ServiceForm/index.tsx +410 -258
  174. package/themes/original/src/components/SignupForm/index.tsx +184 -127
  175. package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
  176. package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
  177. package/themes/original/src/components/SingleProductCard/index.tsx +198 -112
  178. package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
  179. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  180. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  181. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  182. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  183. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  184. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  185. package/themes/original/src/components/UserProfile/index.tsx +56 -31
  186. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  187. package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
  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 +48 -15
  195. package/themes/original/src/components/shared/OButton.tsx +10 -3
  196. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  197. package/themes/original/src/components/shared/OInput.tsx +13 -3
  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 +83 -29
  201. package/themes/original/src/utils/index.tsx +121 -10
  202. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { StyleSheet, View, TouchableOpacity, Linking } from 'react-native';
2
+ import { StyleSheet, View, TouchableOpacity, Linking, Pressable } from 'react-native';
3
+ import FastImage from 'react-native-fast-image'
3
4
  import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
4
5
  import { useTheme } from 'styled-components/native';
5
6
  import { OIcon, OText, OModal } from '../shared';
@@ -45,24 +46,26 @@ export const BusinessBasicInformation = (
45
46
  const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
46
47
  const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
47
48
  const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
49
+ const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
50
+ const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
48
51
 
49
52
  const styles = StyleSheet.create({
50
53
  businesInfoheaderStyle: {
51
54
  height: 150,
52
55
  },
53
56
  headerStyle: {
54
- height: 260,
57
+ height: isChewLayout ? 170 : 260,
55
58
  },
56
- businessLogo: {
59
+ logoStyle: {
57
60
  width: 72,
58
61
  height: 72,
59
62
  borderRadius: 7.6,
60
63
  justifyContent: 'flex-start',
61
- alignItems: 'flex-start',
64
+ alignItems: 'flex-start'
62
65
  },
63
66
  businessInfo: {
64
67
  paddingHorizontal: 40,
65
- paddingTop: 56,
68
+ paddingTop: isChewLayout ? 0 : 56,
66
69
  },
67
70
  bullet: {
68
71
  flexDirection: 'row',
@@ -89,18 +92,32 @@ export const BusinessBasicInformation = (
89
92
  socialIcon: {
90
93
  borderRadius: 3,
91
94
  borderColor: theme.colors.border,
92
- borderWidth: 1,
95
+ borderWidth: isChewLayout ? 0 : 1,
93
96
  width: 20,
94
97
  height: 20,
95
98
  justifyContent: 'center',
96
99
  alignItems: 'center',
97
- marginLeft: 5
100
+ marginRight: 5,
101
+ marginBottom: 7
98
102
  },
99
103
  tiktokIcon: {
100
104
  height: 12,
101
105
  width: 12,
102
106
  margin: 0,
103
- padding: 0
107
+ padding: 0,
108
+ display: 'flex',
109
+ justifyContent: 'center',
110
+ alignItems: 'center'
111
+ },
112
+ headerChewStyle: {
113
+ paddingHorizontal: 30,
114
+ justifyContent: 'center',
115
+ height: '100%'
116
+ },
117
+ socialIconsChewContainer: {
118
+ flexDirection: 'row',
119
+ justifyContent: 'flex-start',
120
+ marginTop: 5
104
121
  }
105
122
  });
106
123
 
@@ -134,14 +151,14 @@ export const BusinessBasicInformation = (
134
151
  };
135
152
 
136
153
  const SocialNetWork = (props: any) => {
137
- const { socialLink, iconTitle} = props
154
+ const { socialLink, iconTitle } = props
138
155
 
139
156
  return (
140
157
  <TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(socialLink)}>
141
158
  <MaterialComIcon
142
159
  name={iconTitle}
143
- color={theme.colors.textNormal}
144
- size={14}
160
+ color={isChewLayout ? theme.colors.black : theme.colors.textNormal}
161
+ size={isChewLayout ? 18 : 14}
145
162
  />
146
163
  </TouchableOpacity>
147
164
  )
@@ -171,196 +188,263 @@ export const BusinessBasicInformation = (
171
188
  }
172
189
  }, [businessState?.business])
173
190
 
191
+ const SocialIcons = () => {
192
+ return (
193
+ <>
194
+ {loading ? (
195
+ <Placeholder Animation={Fade}>
196
+ <View style={{ flexDirection: 'row' }}>
197
+ {[...Array(5).keys()].map(i => (
198
+ <View style={styles.socialIcon} key={i}>
199
+ <PlaceholderLine width={100} height={20} style={{ marginBottom: 0 }} />
200
+ </View>
201
+ ))}
202
+ </View>
203
+ </Placeholder>
204
+ ) : (
205
+ <SocialListWrapper
206
+ showsVerticalScrollIndicator={false}
207
+ showsHorizontalScrollIndicator={false}
208
+ horizontal
209
+ contentContainerStyle={{ flex: 1 }}
210
+ >
211
+ {!!business?.facebook_profile && (
212
+ <SocialNetWork
213
+ socialLink={business?.facebook_profile}
214
+ iconTitle='facebook'
215
+ />
216
+ )}
217
+ {!!business?.instagram_profile && (
218
+ <SocialNetWork
219
+ socialLink={business?.instagram_profile}
220
+ iconTitle='instagram'
221
+ />
222
+ )}
223
+ {!!business?.tiktok_profile && (
224
+ <Pressable style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
225
+ <View style={styles.tiktokIcon}>
226
+ <OIcon
227
+ src={theme.images.general.tiktok}
228
+ style={{ width: 10, height: 12 }}
229
+ cover
230
+ />
231
+ </View>
232
+ </Pressable>
233
+ )}
234
+ {!!business?.pinterest_profile && (
235
+ <SocialNetWork
236
+ socialLink={business?.pinterest_profile}
237
+ iconTitle='pinterest'
238
+ />
239
+ )}
240
+ {!!business?.whatsapp_number && (
241
+ <SocialNetWork
242
+ socialLink={business?.whatsapp_number}
243
+ iconTitle='whatsapp'
244
+ />
245
+ )}
246
+ {!!business?.snapchat_profile && (
247
+ <SocialNetWork
248
+ socialLink={business?.snapchat_profile}
249
+ iconTitle='snapchat'
250
+ />
251
+ )}
252
+ {isChewLayout && (
253
+ <TouchableOpacity onPress={() => handleClickBusinessInformation()}>
254
+ <OText
255
+ color={theme.colors.primary}
256
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
257
+ size={12}
258
+ >
259
+ {t('SEE_MORE_DESCRIPTION', 'See more')}
260
+ </OText>
261
+ </TouchableOpacity>
262
+ )}
263
+ </SocialListWrapper>
264
+ )}
265
+ </>
266
+ )
267
+ }
268
+
174
269
  return (
175
- <BusinessContainer>
270
+ <BusinessContainer isChewLayout={isChewLayout && !showLogo}>
176
271
  <BusinessHeader
272
+ isChewLayout={isChewLayout}
177
273
  style={
178
274
  isBusinessInfoShow
179
275
  ? styles.businesInfoheaderStyle
180
276
  : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
181
277
  }
182
- source={{
183
- uri:
184
- header ||
185
- optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
186
- }}>
187
- {!isBusinessInfoShow && (
278
+ {...(!loading && {
279
+ source: (header || businessState?.business?.header) ? {
280
+ uri: header || optimizeImage(businessState?.business?.header, 'h_250,c_limit')
281
+ } : theme?.images?.dummies?.businessHeader
282
+ })}
283
+ imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
284
+ >
285
+ {!isBusinessInfoShow && !isChewLayout && (
188
286
  <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
189
287
  <OIcon src={theme.images.general.info} width={24} />
190
288
  </WrapBusinessInfo>
191
289
  )}
290
+ {isChewLayout && !loading && (
291
+ <View style={styles.headerChewStyle}>
292
+ <OText size={24} weight={'600'} mBottom={-5}>
293
+ {business?.name}
294
+ </OText>
295
+ {business?.city?.name && (
296
+ <OText>
297
+ {business?.city?.name}
298
+ </OText>
299
+ )}
300
+ <View style={styles.socialIconsChewContainer}>
301
+ <SocialIcons />
302
+ </View>
303
+ </View>
304
+ )}
192
305
  </BusinessHeader>
193
306
  <BusinessInfo style={styles.businessInfo}>
194
- <BusinessLogo>
195
- {loading ? (
196
- <View>
197
- <Placeholder Animation={Fade}>
198
- <PlaceholderLine height={50} width={20} />
199
- </Placeholder>
200
- </View>
201
- ) : (
202
- !isBusinessInfoShow && (
203
- <OIcon
204
- url={
205
- logo ||
206
- optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
207
- }
208
- style={styles.businessLogo}
209
- />
210
- )
211
- )}
212
- </BusinessLogo>
213
- <BusinessInfoItem>
214
- {loading ? (
215
- <Placeholder Animation={Fade}>
216
- <PlaceholderLine height={30} width={20} />
217
- </Placeholder>
218
- ) : (
219
- <TitleWrapper>
220
- <OText size={24} weight={'600'}>
221
- {business?.name}
222
- </OText>
223
- {business?.ribbon?.enabled && (
224
- <RibbonBox
225
- bgColor={business?.ribbon?.color}
226
- isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
227
- isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
228
- >
229
- <OText
230
- size={10}
231
- weight={'400'}
232
- color={theme.colors.white}
233
- numberOfLines={2}
234
- ellipsizeMode='tail'
235
- lineHeight={13}
236
- >
237
- {business?.ribbon?.text}
307
+ {showLogo && (
308
+ <BusinessLogo isChewLayout={isChewLayout}>
309
+ {!isBusinessInfoShow && (
310
+ logo || businessState?.business?.logo ?
311
+ <FastImage
312
+ style={styles.logoStyle}
313
+ source={{
314
+ uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
315
+ priority: FastImage.priority.high,
316
+ cache: FastImage.cacheControl.web
317
+ }}
318
+ resizeMode={FastImage.resizeMode.contain}
319
+ />
320
+ :
321
+ <OIcon
322
+ src={theme?.images?.dummies?.businessLogo}
323
+ style={styles.logoStyle}
324
+ />
325
+ )}
326
+ </BusinessLogo>
327
+ )}
328
+ {!isChewLayout && (
329
+
330
+ <>
331
+ <BusinessInfoItem>
332
+ {loading ? (
333
+ <Placeholder Animation={Fade}>
334
+ <PlaceholderLine height={30} width={20} />
335
+ </Placeholder>
336
+ ) : (
337
+ <TitleWrapper>
338
+ <OText size={24} weight={'600'} numberOfLines={2}>
339
+ {business?.name}
238
340
  </OText>
239
- </RibbonBox>
341
+ {business?.ribbon?.enabled && (
342
+ <RibbonBox
343
+ bgColor={business?.ribbon?.color}
344
+ isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
345
+ isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
346
+ >
347
+ <OText
348
+ size={10}
349
+ weight={'400'}
350
+ color={theme.colors.white}
351
+ numberOfLines={2}
352
+ ellipsizeMode='tail'
353
+ lineHeight={13}
354
+ >
355
+ {business?.ribbon?.text}
356
+ </OText>
357
+ </RibbonBox>
358
+ )}
359
+ </TitleWrapper>
240
360
  )}
241
- <SocialListWrapper
242
- showsVerticalScrollIndicator={false}
243
- showsHorizontalScrollIndicator={false}
244
- horizontal
245
- contentContainerStyle={{ flex: 1, justifyContent: 'flex-end'}}
246
- >
247
- {!!business?.facebook_profile && (
248
- <SocialNetWork
249
- socialLink={business?.facebook_profile}
250
- iconTitle='facebook'
251
- />
252
- )}
253
- {!!business?.instagram_profile && (
254
- <SocialNetWork
255
- socialLink={business?.instagram_profile}
256
- iconTitle='instagram'
257
- />
258
- )}
259
- {!!business?.tiktok_profile && (
260
- <TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
261
- <View style={styles.tiktokIcon}>
262
- <OIcon
263
- src={theme.images.general.tiktok}
264
- style={{ width: '100%', height: '100%'}}
265
- />
266
- </View>
267
- </TouchableOpacity>
268
- )}
269
- {!!business?.pinterest_profile && (
270
- <SocialNetWork
271
- socialLink={business?.pinterest_profile}
272
- iconTitle='pinterest'
273
- />
274
- )}
275
- {!!business?.whatsapp_number && (
276
- <SocialNetWork
277
- socialLink={business?.whatsapp_number}
278
- iconTitle='whatsapp'
279
- />
280
- )}
281
- {!!business?.snapchat_profile && (
282
- <SocialNetWork
283
- socialLink={business?.snapchat_profile}
284
- iconTitle='snapchat'
285
- />
286
- )}
287
- </SocialListWrapper>
288
- </TitleWrapper>
289
- )}
290
- </BusinessInfoItem>
291
- {loading ? (
292
- <Placeholder Animation={Fade}>
293
- <PlaceholderLine width={10} />
294
- </Placeholder>
295
- ) : (
296
- <View style={{ width: '75%' }}>
297
- <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
298
- </View>
299
- )}
300
- <View>
301
- <BusinessInfoItem>
302
- {loading && (
361
+ </BusinessInfoItem>
362
+ {loading ? (
303
363
  <Placeholder Animation={Fade}>
304
- <View style={{ flexDirection: 'row' }}>
305
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
306
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
307
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
308
- <PlaceholderLine width={13} />
309
- </View>
364
+ <PlaceholderLine width={10} />
310
365
  </Placeholder>
366
+ ) : (
367
+ <View style={{ width: '75%' }}>
368
+ <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
369
+ </View>
311
370
  )}
312
- <View style={styles.bullet}>
313
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
314
- {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
315
- </OText>
316
- {orderState?.options?.type === 1 ? (
317
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
318
- {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
319
- </OText>
320
- ) : (
321
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
322
- {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
323
- </OText>
324
- )}
325
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
326
- {parseDistance(business?.distance || 0) + ` \u2022 `}
327
- </OText>
328
- </View>
371
+ {!isChewLayout && (
372
+ <SocialIcons />
373
+ )}
374
+ <View>
375
+ <BusinessInfoItem>
376
+ {loading && (
377
+ <Placeholder Animation={Fade}>
378
+ <View style={{ flexDirection: 'row' }}>
379
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
380
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
381
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
382
+ <PlaceholderLine width={13} />
383
+ </View>
384
+ </Placeholder>
385
+ )}
386
+ <View style={styles.bullet}>
387
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
388
+ {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
389
+ </OText>
390
+ {orderState?.options?.type === 1 ? (
391
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
392
+ {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
393
+ </OText>
394
+ ) : (
395
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
396
+ {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
397
+ </OText>
398
+ )}
399
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
400
+ {parseDistance(business?.distance || 0) + ` \u2022 `}
401
+ </OText>
402
+ </View>
329
403
 
330
- <View style={styles.reviewStyle}>
331
- <OIcon
332
- src={theme.images.general.star}
333
- width={14}
334
- color={theme.colors.textSecondary}
335
- style={{ marginTop: -2, marginEnd: 2 }}
336
- />
337
- <OText size={12} color={theme.colors.textSecondary}>
338
- {business?.reviews?.total}
339
- </OText>
404
+ <View style={styles.reviewStyle}>
405
+ <OIcon
406
+ src={theme.images.general.star}
407
+ width={14}
408
+ color={theme.colors.textSecondary}
409
+ style={{ marginTop: -2, marginEnd: 2 }}
410
+ />
411
+ <OText size={12} color={theme.colors.textSecondary}>
412
+ {business?.reviews?.total}
413
+ </OText>
414
+ </View>
415
+ </BusinessInfoItem>
340
416
  </View>
341
- </BusinessInfoItem>
342
- </View>
343
- <WrapReviews>
344
- {!isBusinessInfoShow && (
345
- <>
346
- {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
417
+ <WrapReviews>
418
+ {!isBusinessInfoShow && (
347
419
  <>
348
- <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
349
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
350
- {t('PRE_ORDER', 'Preorder')}
420
+ {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
421
+ <>
422
+ <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
423
+ <OText
424
+ color={theme.colors.primary}
425
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
426
+ size={12}
427
+ >
428
+ {t('PREORDER', 'Preorder')}
429
+ </OText>
430
+ </TouchableOpacity>
431
+ <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
432
+ </>
433
+ )}
434
+ <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
435
+ <OText
436
+ color={theme.colors.primary}
437
+ style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
438
+ size={12}
439
+ >
440
+ {t('REVIEWS', 'Reviews')}
351
441
  </OText>
352
442
  </TouchableOpacity>
353
- <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
354
443
  </>
355
444
  )}
356
- <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
357
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
358
- {t('REVIEWS', 'Reviews')}
359
- </OText>
360
- </TouchableOpacity>
361
- </>
362
- )}
363
- </WrapReviews>
445
+ </WrapReviews>
446
+ </>
447
+ )}
364
448
  </BusinessInfo>
365
449
  {businessInformationObtained ? (
366
450
  <OModal
@@ -3,7 +3,7 @@ import { Platform } from 'react-native';
3
3
 
4
4
  export const BusinessContainer = styled.View`
5
5
  flex-direction: column;
6
- padding-bottom: 35px;
6
+ padding-bottom: ${(props: any) => props.isChewLayout ? '0' : '35px'};
7
7
  `;
8
8
  export const BusinessHeader = styled.ImageBackground`
9
9
  width: 100%;
@@ -20,7 +20,7 @@ export const BusinessLogo = styled.View`
20
20
  box-shadow: 0 0 2px ${Platform.OS == 'android' ? '#000000DD' : '#0000001A'};
21
21
  elevation: 2;
22
22
  background-color: white;
23
- border-radius: 7.6px;
23
+ border-radius: 7.6px;
24
24
  `;
25
25
  export const BusinessInfo = styled.View`
26
26
  justify-content: flex-start;