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