ordering-ui-react-native 0.16.52 → 0.16.55

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 (34) hide show
  1. package/package.json +1 -1
  2. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  3. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  4. package/themes/original/index.tsx +0 -6
  5. package/themes/original/src/components/AddressForm/index.tsx +6 -5
  6. package/themes/original/src/components/BusinessBasicInformation/index.tsx +197 -142
  7. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
  8. package/themes/original/src/components/BusinessController/index.tsx +116 -78
  9. package/themes/original/src/components/BusinessListingSearch/index.tsx +9 -3
  10. package/themes/original/src/components/BusinessProductsListing/index.tsx +42 -13
  11. package/themes/original/src/components/BusinessProductsListing/styles.tsx +5 -0
  12. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +26 -28
  13. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +241 -95
  14. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +46 -2
  15. package/themes/original/src/components/BusinessesListing/index.tsx +35 -62
  16. package/themes/original/src/components/GoogleMap/index.tsx +10 -11
  17. package/themes/original/src/components/OrderDetails/index.tsx +32 -34
  18. package/themes/original/src/components/ProductForm/index.tsx +1 -1
  19. package/themes/original/src/components/ProductForm/styles.tsx +1 -1
  20. package/themes/original/src/components/ReviewOrder/index.tsx +79 -99
  21. package/themes/original/src/components/ReviewOrder/styles.tsx +0 -9
  22. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  23. package/themes/original/src/components/{Reviews/ReviewOrder → ReviewTrigger}/styles.tsx +2 -21
  24. package/themes/original/src/components/SingleProductCard/index.tsx +122 -90
  25. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  26. package/themes/original/src/components/shared/OBottomPopup.tsx +5 -2
  27. package/themes/original/src/components/shared/OButton.tsx +2 -0
  28. package/themes/original/src/types/index.tsx +2 -5
  29. package/themes/original/src/components/Reviews/ReviewDriver/index.tsx +0 -301
  30. package/themes/original/src/components/Reviews/ReviewDriver/styles.tsx +0 -39
  31. package/themes/original/src/components/Reviews/ReviewOrder/index.tsx +0 -326
  32. package/themes/original/src/components/Reviews/ReviewProducts/index.tsx +0 -101
  33. package/themes/original/src/components/Reviews/ReviewProducts/styles.tsx +0 -17
  34. package/themes/original/src/components/Reviews/index.tsx +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.16.52",
3
+ "version": "0.16.55",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,13 +1,15 @@
1
- import React from 'react'
2
- import { View } from 'react-native'
1
+ import React, { useState } from 'react'
2
+ import { RefreshControl, ScrollView, View } from 'react-native'
3
3
  import { OText } from '../shared'
4
- import { useLanguage } from 'ordering-components/native'
4
+ import { useLanguage, useSession } from 'ordering-components/native'
5
5
  import { DayContainer } from './styles'
6
6
  import { useTheme } from 'styled-components/native'
7
- export const DriverSchedule = (props : any) => {
7
+ export const DriverSchedule = (props: any) => {
8
8
  const { schedule } = props
9
9
  const [, t] = useLanguage()
10
10
  const theme = useTheme()
11
+ const [, { refreshUserInfo }] = useSession()
12
+ const [refreshing] = useState(false);
11
13
 
12
14
  const daysOfWeek = [
13
15
  t('SUNDAY_ABBREVIATION', 'Sun'),
@@ -25,30 +27,45 @@ export const DriverSchedule = (props : any) => {
25
27
  }
26
28
 
27
29
  return (
28
- <View >
29
- <OText size={24} style={{paddingLeft: 30}}>
30
+ <ScrollView
31
+ refreshControl={<RefreshControl
32
+ refreshing={refreshing}
33
+ onRefresh={() => refreshUserInfo()}
34
+ />}
35
+ >
36
+ <OText size={24} style={{ paddingLeft: 30 }}>
30
37
  {t('SCHEDULE', 'Schedule')}
31
38
  </OText>
32
- <View style={{padding: 30}}>
39
+ <View style={{ padding: 30 }}>
33
40
  {schedule.map((item: any, i: number) => (
34
41
  <DayContainer key={daysOfWeek[i]}>
35
- <OText style={{width: '20%'}} size={22} weight={700}>{daysOfWeek[i]}</OText>
36
- <View style={{width: '80%', alignItems: 'center'}}>
42
+ <OText style={{ width: '20%' }} size={22} weight={700}>{daysOfWeek[i]}</OText>
43
+ <View style={{ width: '80%', alignItems: 'center' }}>
37
44
  <>
38
- {item?.enabled ? (
39
- <>
40
- {item?.lapses.map((lapse: any, i: number) => (
41
- <OText size={18} style={{marginTop: 3, marginBottom: 20}} key={`${daysOfWeek[i]}_${i}`}>{scheduleFormatted(lapse.open)} - {scheduleFormatted(lapse.close)}</OText>
42
- ))}
43
- </>
44
- ) : (
45
- <OText size={18} style={{marginTop: 3, marginBottom: 10}} color={theme.colors.red}>{t('NOT_AVAILABLE', 'Not available')}</OText>
46
- )}
45
+ {item?.enabled ? (
46
+ <View>
47
+ {item?.lapses.map((lapse: any, i: number) => (
48
+ <View key={`${daysOfWeek[i]}_${i}`} style={{ marginTop: 3, marginBottom: 20, flexDirection: 'row', justifyContent: 'space-between' }}>
49
+ <OText size={18} style={{ width: '30%' }}>
50
+ {scheduleFormatted(lapse.open)}
51
+ </OText>
52
+ <OText size={18} style={{ width: 15 }}>
53
+ -
54
+ </OText>
55
+ <OText size={18} style={{ width: '30%' }}>
56
+ {scheduleFormatted(lapse.close)}
57
+ </OText>
58
+ </View>
59
+ ))}
60
+ </View>
61
+ ) : (
62
+ <OText size={18} style={{ marginTop: 3, marginBottom: 10 }} color={theme.colors.red}>{t('NOT_AVAILABLE', 'Not available')}</OText>
63
+ )}
47
64
  </>
48
65
  </View>
49
66
  </DayContainer>
50
67
  ))}
51
68
  </View>
52
- </View>
69
+ </ScrollView>
53
70
  )
54
71
  }
@@ -12,13 +12,13 @@ export const ScheduleBlocked = (props : any) => {
12
12
  const deviceWidth = Dimensions.get('screen').width
13
13
 
14
14
  const daysOfWeek = [
15
+ t('SUNDAY', 'Sunday'),
15
16
  t('MONDAY', 'Monday'),
16
17
  t('TUESDAY', 'Tuesday'),
17
18
  t('WEDNESDAY', 'Wednesday'),
18
19
  t('THURSDAY', 'Thurday'),
19
20
  t('FRIDAY', 'Friday'),
20
21
  t('SATURDAY', 'Saturday'),
21
- t('SUNDAY', 'Sunday')
22
22
  ]
23
23
 
24
24
  const scheduleFormatted = ({ hour, minute }: any) => {
@@ -41,7 +41,7 @@ export const ScheduleBlocked = (props : any) => {
41
41
  <OText>{t('OUTSIDE_ESTABLISHED_SCHEDULE', 'You are outside the established schedule')}</OText>
42
42
  <View style={{ flexDirection: 'row', marginBottom: 20 }}>
43
43
  <OText color={theme.colors.primary}>{t('NEXT_TIME', 'Next time')}: </OText>
44
- <OText>{daysOfWeek[nextSchedule?.day - 1]} {scheduleFormatted(nextSchedule?.schedule?.open)}</OText>
44
+ <OText>{daysOfWeek[nextSchedule?.day]} {scheduleFormatted(nextSchedule?.schedule?.open)}</OText>
45
45
  </View>
46
46
  <OButton
47
47
  text={t('GO_BACK', 'Go back')}
@@ -29,9 +29,6 @@ import { UserProfileForm } from './src/components/UserProfileForm';
29
29
  import { ReviewOrder } from './src/components/ReviewOrder';
30
30
  import { ReviewProducts } from './src/components/ReviewProducts';
31
31
  import { ReviewDriver } from './src/components/ReviewDriver';
32
- import { ReviewOrder as ReviewOrderModal } from './src/components/Reviews/ReviewOrder';
33
- import { ReviewProducts as ReviewProductsModal } from './src/components/Reviews/ReviewProducts';
34
- import { ReviewDriver as ReviewDriverModal } from './src/components/Reviews/ReviewDriver';
35
32
  import { UserProfile } from './src/components/UserProfile';
36
33
  import { MessageListing } from './src/components/MessageListing';
37
34
  import { Messages } from './src/components/Messages';
@@ -189,9 +186,6 @@ export {
189
186
  ReviewOrder,
190
187
  ReviewProducts,
191
188
  ReviewDriver,
192
- ReviewOrderModal,
193
- ReviewProductsModal,
194
- ReviewDriverModal,
195
189
  BusinessMenuList,
196
190
  UserProfile,
197
191
  MessageListing,
@@ -109,8 +109,8 @@ const AddressFormUI = (props: AddressFormParams) => {
109
109
  zIndex: 1002,
110
110
  },
111
111
  wrapperNavbar: Platform.OS === 'ios'
112
- ? { paddingVertical: 0, paddingHorizontal: 40 }
113
- : { paddingVertical: 20, paddingHorizontal: 40 }
112
+ ? { paddingVertical: 0, paddingHorizontal: 40 }
113
+ : { paddingVertical: 20, paddingHorizontal: 40 }
114
114
  });
115
115
 
116
116
  const [, t] = useLanguage();
@@ -156,7 +156,7 @@ const AddressFormUI = (props: AddressFormParams) => {
156
156
  const maxLimitLocation =
157
157
  configState?.configs?.meters_to_change_address?.value;
158
158
 
159
- const continueAsGuest = () => navigation.navigate('BusinessList');
159
+ const continueAsGuest = () => navigation.navigate('BusinessList', { isGuestUser: true });
160
160
  const goToBack = () => navigation?.canGoBack() && navigation.goBack();
161
161
 
162
162
  const getAddressFormatted = (address: any) => {
@@ -203,6 +203,7 @@ const AddressFormUI = (props: AddressFormParams) => {
203
203
  saveAddress(data.address);
204
204
  if (isGuestUser) {
205
205
  continueAsGuest();
206
+ return;
206
207
  }
207
208
  if (!isGuestUser && !auth) {
208
209
  !isFromProductsList
@@ -600,13 +601,13 @@ const AddressFormUI = (props: AddressFormParams) => {
600
601
  />
601
602
  {hasEditing ? (
602
603
  <View style={styles.pinIcon}>
603
- <GPSButton
604
+ <GPSButton
604
605
  apiKey={googleMapsApiKey}
605
606
  handleGPS={(data: any, detail: any) => {
606
607
  handleChangeAddress(data, detail);
607
608
  setValue(data.address);
608
609
  if (googleInput?.current) {
609
- googleInput?.current?.setAddressText( data.address );
610
+ googleInput?.current?.setAddressText(data.address);
610
611
  }
611
612
  }}
612
613
  IconButton={<OIcon src={theme.images.general.pin} width={16} />}
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { StyleSheet, View, TouchableOpacity, Linking } from 'react-native';
3
- import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
3
+ import { useUtils, useOrder, useLanguage, useOrderingTheme } from 'ordering-components/native';
4
4
  import { useTheme } from 'styled-components/native';
5
5
  import { OIcon, OText, OModal } from '../shared';
6
6
  import { BusinessBasicInformationParams } from '../../types';
@@ -38,6 +38,7 @@ export const BusinessBasicInformation = (
38
38
  const { business, loading } = businessState;
39
39
 
40
40
  const theme = useTheme();
41
+ const [orderingTheme] = useOrderingTheme()
41
42
  const [orderState] = useOrder();
42
43
  const [, t] = useLanguage();
43
44
  const [{ parsePrice, parseDistance, optimizeImage }] = useUtils();
@@ -45,13 +46,15 @@ export const BusinessBasicInformation = (
45
46
  const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
46
47
  const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
47
48
  const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
48
-
49
+ const isChewLayout = theme?.layouts?.business_view?.components?.header?.components?.layout?.type === 'chew'
50
+ const showLogo = !orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
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
59
  businessLogo: {
57
60
  width: 72,
@@ -62,7 +65,7 @@ export const BusinessBasicInformation = (
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,7 +92,7 @@ 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',
@@ -102,6 +105,16 @@ export const BusinessBasicInformation = (
102
105
  width: 12,
103
106
  margin: 0,
104
107
  padding: 0
108
+ },
109
+ headerChewStyle: {
110
+ paddingHorizontal: 30,
111
+ justifyContent: 'center',
112
+ height: '100%'
113
+ },
114
+ socialIconsChewContainer: {
115
+ flexDirection: 'row',
116
+ justifyContent: 'flex-start',
117
+ marginTop: 5
105
118
  }
106
119
  });
107
120
 
@@ -135,14 +148,14 @@ export const BusinessBasicInformation = (
135
148
  };
136
149
 
137
150
  const SocialNetWork = (props: any) => {
138
- const { socialLink, iconTitle} = props
151
+ const { socialLink, iconTitle } = props
139
152
 
140
153
  return (
141
154
  <TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(socialLink)}>
142
155
  <MaterialComIcon
143
156
  name={iconTitle}
144
- color={theme.colors.textNormal}
145
- size={14}
157
+ color={isChewLayout ? theme.colors.black : theme.colors.textNormal}
158
+ size={isChewLayout ? 18 : 14}
146
159
  />
147
160
  </TouchableOpacity>
148
161
  )
@@ -172,85 +185,9 @@ export const BusinessBasicInformation = (
172
185
  }
173
186
  }, [businessState?.business])
174
187
 
175
- return (
176
- <BusinessContainer>
177
- <BusinessHeader
178
- style={
179
- isBusinessInfoShow
180
- ? styles.businesInfoheaderStyle
181
- : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
182
- }
183
- source={{
184
- uri:
185
- header ||
186
- optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
187
- }}>
188
- {!isBusinessInfoShow && (
189
- <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
190
- <OIcon src={theme.images.general.info} width={24} />
191
- </WrapBusinessInfo>
192
- )}
193
- </BusinessHeader>
194
- <BusinessInfo style={styles.businessInfo}>
195
- <BusinessLogo>
196
- {loading ? (
197
- <View>
198
- <Placeholder Animation={Fade}>
199
- <PlaceholderLine height={50} width={20} />
200
- </Placeholder>
201
- </View>
202
- ) : (
203
- !isBusinessInfoShow && (
204
- <OIcon
205
- url={
206
- logo ||
207
- optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
208
- }
209
- style={styles.businessLogo}
210
- />
211
- )
212
- )}
213
- </BusinessLogo>
214
- <BusinessInfoItem>
215
- {loading ? (
216
- <Placeholder Animation={Fade}>
217
- <PlaceholderLine height={30} width={20} />
218
- </Placeholder>
219
- ) : (
220
- <TitleWrapper>
221
- <OText size={24} weight={'600'}>
222
- {business?.name}
223
- </OText>
224
- {business?.ribbon?.enabled && (
225
- <RibbonBox
226
- bgColor={business?.ribbon?.color}
227
- isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
228
- isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
229
- >
230
- <OText
231
- size={10}
232
- weight={'400'}
233
- color={theme.colors.white}
234
- numberOfLines={2}
235
- ellipsizeMode='tail'
236
- lineHeight={13}
237
- >
238
- {business?.ribbon?.text}
239
- </OText>
240
- </RibbonBox>
241
- )}
242
- </TitleWrapper>
243
- )}
244
- </BusinessInfoItem>
245
- {loading ? (
246
- <Placeholder Animation={Fade}>
247
- <PlaceholderLine width={10} />
248
- </Placeholder>
249
- ) : (
250
- <View style={{ width: '75%' }}>
251
- <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
252
- </View>
253
- )}
188
+ const SocialIcons = () => {
189
+ return (
190
+ <>
254
191
  {loading ? (
255
192
  <Placeholder Animation={Fade}>
256
193
  <View style={{ flexDirection: 'row' }}>
@@ -266,7 +203,7 @@ export const BusinessBasicInformation = (
266
203
  showsVerticalScrollIndicator={false}
267
204
  showsHorizontalScrollIndicator={false}
268
205
  horizontal
269
- contentContainerStyle={{ flex: 1}}
206
+ contentContainerStyle={{ flex: 1 }}
270
207
  >
271
208
  {!!business?.facebook_profile && (
272
209
  <SocialNetWork
@@ -285,7 +222,7 @@ export const BusinessBasicInformation = (
285
222
  <View style={styles.tiktokIcon}>
286
223
  <OIcon
287
224
  src={theme.images.general.tiktok}
288
- style={{ width: '100%', height: '100%'}}
225
+ style={{ width: '100%', height: '100%' }}
289
226
  />
290
227
  </View>
291
228
  </TouchableOpacity>
@@ -308,72 +245,190 @@ export const BusinessBasicInformation = (
308
245
  iconTitle='snapchat'
309
246
  />
310
247
  )}
248
+ {isChewLayout && (
249
+ <TouchableOpacity onPress={() => handleClickBusinessInformation()}>
250
+ <OText style={{textDecorationColor: theme.colors.black, textDecorationLine: 'underline'}}>
251
+ {t('SEE_MORE_DESCRIPTION', 'See more')}
252
+ </OText>
253
+ </TouchableOpacity>
254
+ )}
311
255
  </SocialListWrapper>
312
256
  )}
313
- <View>
314
- <BusinessInfoItem>
315
- {loading && (
316
- <Placeholder Animation={Fade}>
317
- <View style={{ flexDirection: 'row' }}>
318
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
319
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
320
- <PlaceholderLine width={13} style={{ marginRight: 10 }} />
321
- <PlaceholderLine width={13} />
322
- </View>
323
- </Placeholder>
324
- )}
325
- <View style={styles.bullet}>
326
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
327
- {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
257
+ </>
258
+ )
259
+ }
260
+
261
+ return (
262
+ <BusinessContainer isChewLayout={isChewLayout && !showLogo}>
263
+ <BusinessHeader
264
+ isChewLayout={isChewLayout}
265
+ style={
266
+ isBusinessInfoShow
267
+ ? styles.businesInfoheaderStyle
268
+ : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
269
+ }
270
+ source={{
271
+ uri:
272
+ header ||
273
+ optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
274
+ }}
275
+ imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
276
+ >
277
+ {!isBusinessInfoShow && !isChewLayout && (
278
+ <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
279
+ <OIcon src={theme.images.general.info} width={24} />
280
+ </WrapBusinessInfo>
281
+ )}
282
+ {isChewLayout && (
283
+ <View style={styles.headerChewStyle}>
284
+ <OText size={24} weight={'600'} mBottom={-5}>
285
+ {business?.name}
286
+ </OText>
287
+ {business?.city?.name && (
288
+ <OText>
289
+ {business?.city?.name}
328
290
  </OText>
329
- {orderState?.options?.type === 1 ? (
330
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
331
- {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
332
- </OText>
291
+ )}
292
+ <View style={styles.socialIconsChewContainer}>
293
+ <SocialIcons />
294
+ </View>
295
+ </View>
296
+ )}
297
+ </BusinessHeader>
298
+ <BusinessInfo style={styles.businessInfo}>
299
+ {showLogo && (
300
+ <BusinessLogo isChewLayout={isChewLayout}>
301
+ {loading ? (
302
+ <View>
303
+ <Placeholder Animation={Fade}>
304
+ <PlaceholderLine height={50} width={20} />
305
+ </Placeholder>
306
+ </View>
307
+ ) : (
308
+ !isBusinessInfoShow && (
309
+ <OIcon
310
+ url={
311
+ logo ||
312
+ optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
313
+ }
314
+ style={styles.businessLogo}
315
+ />
316
+ )
317
+ )}
318
+ </BusinessLogo>
319
+ )}
320
+ {!isChewLayout && (
321
+
322
+ <>
323
+ <BusinessInfoItem>
324
+ {loading ? (
325
+ <Placeholder Animation={Fade}>
326
+ <PlaceholderLine height={30} width={20} />
327
+ </Placeholder>
333
328
  ) : (
334
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
335
- {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
336
- </OText>
329
+ <TitleWrapper>
330
+ <OText size={24} weight={'600'}>
331
+ {business?.name}
332
+ </OText>
333
+ {business?.ribbon?.enabled && (
334
+ <RibbonBox
335
+ bgColor={business?.ribbon?.color}
336
+ isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
337
+ isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
338
+ >
339
+ <OText
340
+ size={10}
341
+ weight={'400'}
342
+ color={theme.colors.white}
343
+ numberOfLines={2}
344
+ ellipsizeMode='tail'
345
+ lineHeight={13}
346
+ >
347
+ {business?.ribbon?.text}
348
+ </OText>
349
+ </RibbonBox>
350
+ )}
351
+ </TitleWrapper>
337
352
  )}
338
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
339
- {parseDistance(business?.distance || 0) + ` \u2022 `}
340
- </OText>
341
- </View>
353
+ </BusinessInfoItem>
354
+ {loading ? (
355
+ <Placeholder Animation={Fade}>
356
+ <PlaceholderLine width={10} />
357
+ </Placeholder>
358
+ ) : (
359
+ <View style={{ width: '75%' }}>
360
+ <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
361
+ </View>
362
+ )}
363
+ {!isChewLayout && (
364
+ <SocialIcons />
365
+ )}
366
+ <View>
367
+ <BusinessInfoItem>
368
+ {loading && (
369
+ <Placeholder Animation={Fade}>
370
+ <View style={{ flexDirection: 'row' }}>
371
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
372
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
373
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
374
+ <PlaceholderLine width={13} />
375
+ </View>
376
+ </Placeholder>
377
+ )}
378
+ <View style={styles.bullet}>
379
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
380
+ {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
381
+ </OText>
382
+ {orderState?.options?.type === 1 ? (
383
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
384
+ {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
385
+ </OText>
386
+ ) : (
387
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
388
+ {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
389
+ </OText>
390
+ )}
391
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
392
+ {parseDistance(business?.distance || 0) + ` \u2022 `}
393
+ </OText>
394
+ </View>
342
395
 
343
- <View style={styles.reviewStyle}>
344
- <OIcon
345
- src={theme.images.general.star}
346
- width={14}
347
- color={theme.colors.textSecondary}
348
- style={{ marginTop: -2, marginEnd: 2 }}
349
- />
350
- <OText size={12} color={theme.colors.textSecondary}>
351
- {business?.reviews?.total}
352
- </OText>
396
+ <View style={styles.reviewStyle}>
397
+ <OIcon
398
+ src={theme.images.general.star}
399
+ width={14}
400
+ color={theme.colors.textSecondary}
401
+ style={{ marginTop: -2, marginEnd: 2 }}
402
+ />
403
+ <OText size={12} color={theme.colors.textSecondary}>
404
+ {business?.reviews?.total}
405
+ </OText>
406
+ </View>
407
+ </BusinessInfoItem>
353
408
  </View>
354
- </BusinessInfoItem>
355
- </View>
356
- <WrapReviews>
357
- {!isBusinessInfoShow && (
358
- <>
359
- {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
409
+ <WrapReviews>
410
+ {!isBusinessInfoShow && (
360
411
  <>
361
- <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
412
+ {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
413
+ <>
414
+ <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
415
+ <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
416
+ {t('PRE_ORDER', 'Preorder')}
417
+ </OText>
418
+ </TouchableOpacity>
419
+ <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
420
+ </>
421
+ )}
422
+ <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
362
423
  <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
363
- {t('PRE_ORDER', 'Preorder')}
424
+ {t('REVIEWS', 'Reviews')}
364
425
  </OText>
365
426
  </TouchableOpacity>
366
- <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
367
427
  </>
368
428
  )}
369
- <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
370
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
371
- {t('REVIEWS', 'Reviews')}
372
- </OText>
373
- </TouchableOpacity>
374
- </>
375
- )}
376
- </WrapReviews>
429
+ </WrapReviews>
430
+ </>
431
+ )}
377
432
  </BusinessInfo>
378
433
  {businessInformationObtained ? (
379
434
  <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;