ordering-ui-react-native 0.15.8 → 0.15.10-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 (130) hide show
  1. package/package.json +5 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessTypeFilter/index.tsx +12 -2
  4. package/src/components/BusinessTypeFilter/styles.tsx +1 -1
  5. package/src/components/BusinessesListing/index.tsx +1 -1
  6. package/src/components/Checkout/index.tsx +0 -1
  7. package/src/components/LanguageSelector/index.tsx +1 -0
  8. package/src/components/Messages/index.tsx +38 -30
  9. package/src/components/MomentOption/index.tsx +3 -1
  10. package/src/components/OrderDetails/index.tsx +25 -4
  11. package/src/components/PaymentOptions/index.tsx +9 -16
  12. package/src/components/PaymentOptionsWebView/index.tsx +123 -124
  13. package/src/components/ProductForm/index.tsx +1 -1
  14. package/src/components/ProductForm/styles.tsx +1 -0
  15. package/src/components/StripeElementsForm/index.tsx +27 -48
  16. package/src/components/VerifyPhone/styles.tsx +1 -2
  17. package/src/config.json +0 -2
  18. package/src/pages/Checkout.tsx +1 -1
  19. package/src/types/index.tsx +1 -9
  20. package/src/utils/index.tsx +2 -1
  21. package/themes/business/index.tsx +2 -0
  22. package/themes/business/src/components/Chat/index.tsx +32 -31
  23. package/themes/business/src/components/Home/index.tsx +128 -55
  24. package/themes/business/src/components/Home/styles.tsx +8 -1
  25. package/themes/business/src/components/NewOrderNotification/index.tsx +59 -98
  26. package/themes/business/src/components/OrderDetails/Business.tsx +1 -0
  27. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +27 -0
  28. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +85 -17
  29. package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
  30. package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
  31. package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
  32. package/themes/business/src/components/OrdersOption/index.tsx +70 -116
  33. package/themes/business/src/components/OrdersOption/styles.tsx +2 -5
  34. package/themes/business/src/components/PreviousOrders/index.tsx +82 -23
  35. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  36. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  37. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  38. package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
  39. package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
  40. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +51 -24
  41. package/themes/kiosk/src/components/Cart/index.tsx +1 -1
  42. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
  43. package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
  44. package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
  45. package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
  46. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +7 -5
  47. package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
  48. package/themes/kiosk/src/components/Intro/index.tsx +13 -13
  49. package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
  50. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  51. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  52. package/themes/kiosk/src/components/OrderDetails/index.tsx +2 -2
  53. package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
  54. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
  55. package/themes/kiosk/src/components/ProductForm/index.tsx +174 -126
  56. package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
  57. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
  58. package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
  59. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
  60. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  61. package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
  62. package/themes/original/index.tsx +177 -0
  63. package/themes/original/src/components/AddressForm/index.tsx +15 -10
  64. package/themes/original/src/components/AddressList/index.tsx +28 -2
  65. package/themes/original/src/components/AppleLogin/index.tsx +119 -78
  66. package/themes/original/src/components/BusinessBasicInformation/index.tsx +95 -44
  67. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
  68. package/themes/original/src/components/BusinessController/index.tsx +32 -21
  69. package/themes/original/src/components/BusinessListingSearch/index.tsx +7 -3
  70. package/themes/original/src/components/BusinessMenuList/index.tsx +11 -4
  71. package/themes/original/src/components/BusinessPreorder/index.tsx +141 -121
  72. package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
  73. package/themes/original/src/components/BusinessProductsList/index.tsx +129 -22
  74. package/themes/original/src/components/BusinessProductsList/styles.tsx +32 -2
  75. package/themes/original/src/components/BusinessProductsListing/index.tsx +92 -37
  76. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  77. package/themes/original/src/components/BusinessReviews/index.tsx +4 -25
  78. package/themes/original/src/components/BusinessesListing/index.tsx +40 -53
  79. package/themes/original/src/components/Cart/index.tsx +40 -9
  80. package/themes/original/src/components/CartContent/index.tsx +2 -2
  81. package/themes/original/src/components/Checkout/index.tsx +47 -31
  82. package/themes/original/src/components/Checkout/styles.tsx +7 -0
  83. package/themes/original/src/components/CouponControl/index.tsx +1 -0
  84. package/themes/original/src/components/DriverTips/index.tsx +1 -1
  85. package/themes/original/src/components/ForgotPasswordForm/index.tsx +8 -12
  86. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  87. package/themes/original/src/components/Home/index.tsx +1 -1
  88. package/themes/original/src/components/LoginForm/index.tsx +156 -70
  89. package/themes/original/src/components/LoginForm/styles.tsx +6 -1
  90. package/themes/original/src/components/Messages/index.tsx +52 -45
  91. package/themes/original/src/components/Messages/styles.tsx +1 -3
  92. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  93. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  94. package/themes/original/src/components/OrderDetails/index.tsx +104 -126
  95. package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
  96. package/themes/original/src/components/OrderProgress/index.tsx +4 -4
  97. package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
  98. package/themes/original/src/components/OrderSummary/index.tsx +34 -1
  99. package/themes/original/src/components/OrdersOption/index.tsx +15 -46
  100. package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
  101. package/themes/original/src/components/PaymentOptionWallet/index.tsx +6 -2
  102. package/themes/original/src/components/PaymentOptions/index.tsx +24 -25
  103. package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -8
  104. package/themes/original/src/components/PlaceSpot/index.tsx +114 -0
  105. package/themes/original/src/components/PlaceSpot/styles.tsx +11 -0
  106. package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
  107. package/themes/original/src/components/ProductForm/index.tsx +31 -20
  108. package/themes/original/src/components/ProductForm/styles.tsx +2 -2
  109. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  110. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  111. package/themes/original/src/components/SignupForm/index.tsx +173 -154
  112. package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
  113. package/themes/original/src/components/TaxInformation/index.tsx +17 -7
  114. package/themes/original/src/components/UpsellingProducts/index.tsx +6 -6
  115. package/themes/original/src/components/UserDetails/index.tsx +4 -95
  116. package/themes/original/src/components/UserFormDetails/index.tsx +2 -14
  117. package/themes/original/src/components/UserProfile/index.tsx +16 -16
  118. package/themes/original/src/components/UserProfileForm/index.tsx +8 -6
  119. package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
  120. package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
  121. package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
  122. package/themes/original/src/components/shared/index.tsx +2 -0
  123. package/themes/original/src/config/constants.tsx +6 -6
  124. package/themes/original/src/types/index.tsx +63 -23
  125. package/themes/original/src/utils/index.tsx +12 -2
  126. package/themes/single-business/src/components/AddressList/index.tsx +1 -1
  127. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +5 -5
  128. package/themes/single-business/src/components/UserProfile/index.tsx +1 -1
  129. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  130. package/src/components/StripeMethodForm/index.tsx +0 -168
@@ -39,7 +39,8 @@ import {
39
39
  ChCart,
40
40
  DeliveryOptionsContainer,
41
41
  DeliveryOptionItem,
42
- WalletPaymentOptionContainer
42
+ WalletPaymentOptionContainer,
43
+ CartHeader
43
44
  } from './styles';
44
45
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
45
46
 
@@ -131,10 +132,11 @@ const CheckoutUI = (props: any) => {
131
132
  const [isDeliveryOptionModalVisible, setIsDeliveryOptionModalVisible] = useState(false)
132
133
  const [showGateway, setShowGateway] = useState<any>({ closedByUsed: false, open: false });
133
134
  const [webviewPaymethod, setWebviewPaymethod] = useState<any>(null)
134
-
135
-
135
+
136
+ const placeSpotTypes = [3, 4]
136
137
  const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
137
138
  const isPreOrder = configs?.preorder_status_enabled?.value === '1'
139
+ const isDisabledButtonPlace = loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash || cart?.subtotal < cart?.minimum || (placeSpotTypes.includes(options?.type) && !cart?.place)
138
140
 
139
141
  const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
140
142
  ? JSON.parse(configs?.driver_tip_options?.value) || []
@@ -155,7 +157,7 @@ const CheckoutUI = (props: any) => {
155
157
  navigation.navigate('MomentOption')
156
158
  }
157
159
  }
158
-
160
+
159
161
  const handlePlaceOrder = () => {
160
162
  if (!userErrors.length) {
161
163
  handlerClickPlaceOrder && handlerClickPlaceOrder()
@@ -200,8 +202,8 @@ const CheckoutUI = (props: any) => {
200
202
  if (
201
203
  !user?.cellphone &&
202
204
  ((validationFields?.fields?.checkout?.cellphone?.enabled &&
203
- validationFields?.fields?.checkout?.cellphone?.required) ||
204
- configs?.verification_phone_required?.value === '1')
205
+ validationFields?.fields?.checkout?.cellphone?.required) ||
206
+ configs?.verification_phone_required?.value === '1')
205
207
  ) {
206
208
  errors.push(t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone number is required'))
207
209
  }
@@ -251,8 +253,8 @@ const CheckoutUI = (props: any) => {
251
253
  isVertical
252
254
  onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
253
255
  title={t('CHECKOUT', 'Checkout')}
254
- style={styles.pagePadding}
255
- titleStyle={{ marginLeft: 0, marginRight: 0 }}
256
+ titleStyle={{ marginLeft: 0, marginRight: 0, paddingLeft: 40 }}
257
+ btnStyle={{ marginLeft: 40, padding: 40 }}
256
258
  />
257
259
  <ChContainer style={styles.pagePadding}>
258
260
  <ChSection style={{ paddingTop: 0 }}>
@@ -267,15 +269,15 @@ const CheckoutUI = (props: any) => {
267
269
  />
268
270
  </CHMomentWrapper>
269
271
  <CHMomentWrapper
270
- onPress={() => handleMomentClick()}
271
- disabled={loading}
272
+ onPress={() => handleMomentClick()}
273
+ disabled={loading}
272
274
  >
273
275
  <OText size={12} numberOfLines={1} ellipsizeMode='tail' color={theme.colors.textSecondary}>
274
276
  {options?.moment
275
277
  ? parseDate(options?.moment, { outputFormat: configs?.dates_moment_format?.value })
276
278
  : t('ASAP_ABBREVIATION', 'ASAP')}
277
279
  </OText>
278
- { isPreOrder && (
280
+ {isPreOrder && (
279
281
  <OIcon
280
282
  src={theme.images.general.arrow_down}
281
283
  width={10}
@@ -544,17 +546,17 @@ const CheckoutUI = (props: any) => {
544
546
  onNavigationRedirect={onNavigationRedirect}
545
547
  paySelected={paymethodSelected}
546
548
  handlePaymentMethodClickCustom={handlePaymentMethodClick}
547
- handlePlaceOrder={handlePlaceOrder}
548
549
  />
549
550
  </ChPaymethods>
550
551
  </ChSection>
551
552
  )}
552
553
 
553
- {!cartState.loading && cart && isWalletEnabled && (
554
+ {!cartState.loading && cart && isWalletEnabled && businessDetails?.business?.configs && (
554
555
  <WalletPaymentOptionContainer>
555
556
  <PaymentOptionWallet
556
557
  cart={cart}
557
558
  businessId={cart?.business_id}
559
+ businessConfigs={businessDetails?.business?.configs}
558
560
  />
559
561
  </WalletPaymentOptionContainer>
560
562
  )}
@@ -570,9 +572,28 @@ const CheckoutUI = (props: any) => {
570
572
  />
571
573
  ) : (
572
574
  <>
573
- <OText size={16} lineHeight={24} color={theme.colors.textNormal}>
574
- {t('ORDER_SUMMARY', 'Order Summary')}
575
- </OText>
575
+ <CartHeader>
576
+ <OText
577
+ size={16}
578
+ lineHeight={24}
579
+ color={theme.colors.textNormal}
580
+ style={{ fontWeight: '500' }}
581
+ >
582
+ {t('MOBILE_FRONT_YOUR_ORDER', 'Your order')}
583
+ </OText>
584
+ <TouchableOpacity
585
+ onPress={() => onNavigationRedirect('Business', { store: cart?.business?.slug })}
586
+ >
587
+ <OText
588
+ size={10}
589
+ lineHeight={15}
590
+ color={theme.colors.primary}
591
+ style={{ textDecorationLine: 'underline' }}
592
+ >
593
+ {t('ADD_PRODUCTS', 'Add products')}
594
+ </OText>
595
+ </TouchableOpacity>
596
+ </CartHeader>
576
597
  {props.isFranchiseApp && (
577
598
  <TouchableOpacity
578
599
  onPress={() => setOpenChangeStore(true)}
@@ -628,6 +649,14 @@ const CheckoutUI = (props: any) => {
628
649
  {t('WARNING_INVALID_PRODUCTS', 'Some products are invalid, please check them.')}
629
650
  </OText>
630
651
  )}
652
+ {placeSpotTypes.includes(options?.type) && !cart?.place && (
653
+ <OText
654
+ color={theme.colors.error}
655
+ size={12}
656
+ >
657
+ {t('WARNING_PLACE_SPOT', 'Please, select your spot to place order.')}
658
+ </OText>
659
+ )}
631
660
  </ChErrors>
632
661
  </View>
633
662
  )}
@@ -647,8 +676,8 @@ const CheckoutUI = (props: any) => {
647
676
  {!cartState.loading && cart && cart?.status !== 2 && (
648
677
  <FloatingButton
649
678
  handleClick={() => handlePlaceOrder()}
650
- isSecondaryBtn={loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash || cart?.subtotal < cart?.minimum}
651
- disabled={loading || !cart?.valid || (!paymethodSelected && cart?.balance > 0) || placing || errorCash || cart?.subtotal < cart?.minimum}
679
+ isSecondaryBtn={isDisabledButtonPlace}
680
+ disabled={isDisabledButtonPlace}
652
681
  btnText={cart?.subtotal >= cart?.minimum
653
682
  ? (
654
683
  placing
@@ -676,19 +705,6 @@ const CheckoutUI = (props: any) => {
676
705
  setShowGateway={setShowGateway}
677
706
  />
678
707
  )}
679
- {webviewPaymethod?.gateway === 'square' && showGateway.open && (
680
- <PaymentOptionsWebView
681
- onNavigationRedirect={onNavigationRedirect}
682
- uri={`https://test-square-f50f7.web.app`}
683
- user={user}
684
- token={token}
685
- cart={cart}
686
- currency={currency}
687
- webviewPaymethod={webviewPaymethod}
688
- setShowGateway={setShowGateway}
689
- locationId={'L1NGAY5M6KJRX'}
690
- />
691
- )}
692
708
  </>
693
709
  )
694
710
  }
@@ -105,3 +105,10 @@ export const DeliveryOptionItem = styled.View`
105
105
  flex-direction: row;
106
106
  background-color: ${(props : any) => props?.backgroundColor ?? '#fff'};
107
107
  `;
108
+
109
+ export const CartHeader = styled.View`
110
+ align-items: center;
111
+ flex-direction: row;
112
+ justify-content: space-between;
113
+ margin-bottom: 10px;
114
+ `
@@ -87,6 +87,7 @@ const CouponControlUI = (props: any) => {
87
87
  ) : (
88
88
  <CCWrapper>
89
89
  <OInput
90
+ value={couponInput}
90
91
  placeholder={t('DISCOUNT_COUPON', 'Discount coupon')}
91
92
  onChange={(e: any) => onChangeInputCoupon(e)}
92
93
  style={styles.inputsStyle}
@@ -63,7 +63,7 @@ const DriverTipsUI = (props: any) => {
63
63
  return (
64
64
  <DTContainer>
65
65
  <DTWrapperTips>
66
- {driverTipsOptions.map((option: any, i: number) => (
66
+ {driverTipsOptions.map((option: any, i: number) => (
67
67
  <TouchableOpacity
68
68
  key={i}
69
69
  onPress={() => handlerChangeOption(option)}
@@ -65,18 +65,6 @@ const ForgotPasswordUI = (props: any) => {
65
65
  }
66
66
  }, [formState])
67
67
 
68
- useEffect(() => {
69
- if (Object.keys(errors).length > 0) {
70
- // Convert all errors in one string to show in toast provider
71
- const list = Object.values(errors)
72
- let stringError = ''
73
- list.map((item: any, i: number) => {
74
- stringError += (i + 1) === list.length ? `- ${item.message}` : `- ${item.message}\n`
75
- })
76
- showToast(ToastType.Error, stringError)
77
- }
78
- }, [errors])
79
-
80
68
  return (
81
69
  <Container>
82
70
  <NavBar
@@ -100,6 +88,14 @@ const ForgotPasswordUI = (props: any) => {
100
88
  {t('FORGOT_PASSWORD_TEXT_MESSAGE', "Enter your email address and we'll sent a link to reset your password.")}
101
89
  </OText>
102
90
  <FormInput>
91
+ {errors?.email && (
92
+ <OText
93
+ size={14}
94
+ color={theme.colors.danger5}
95
+ weight={'normal'}>
96
+ {errors?.email?.message}{errors?.email?.type === 'required' && '*'}
97
+ </OText>
98
+ )}
103
99
  <Controller
104
100
  control={control}
105
101
  render={({ onChange, value }: any) => (
@@ -1,8 +1,8 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import {
3
- BusinessList as BusinessesListingController,
3
+ BusinessList as BusinessesListingController,
4
4
  useLanguage,
5
- useOrder
5
+ useOrder
6
6
  } from 'ordering-components/native';
7
7
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
8
8
  import { View, ScrollView, Platform, Dimensions } from 'react-native';
@@ -24,117 +24,125 @@ const HighestRatedBusinessesUI = (props: HighestRatedBusinessesParams) => {
24
24
  } = props;
25
25
 
26
26
  const [, t] = useLanguage()
27
- const [orderState] = useOrder();
27
+ const [orderState] = useOrder()
28
28
 
29
29
  const windowWidth = Dimensions.get('window').width;
30
30
 
31
31
  useEffect(() => {
32
- if (businessesList?.loading || !isLoading) return
32
+ if (businessesList?.loading || !isLoading) return
33
33
  getBusinesses(true)
34
34
  }, [isLoading])
35
35
 
36
36
  return (
37
37
  <>
38
- <ListWrapper>
39
- <OText size={16} mBottom={5} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('HIGHEST_RATED', 'Highest rated')}</OText>
40
- <OText size={12}>{t('TOP_RATINGS_AND_GREAT_SERVICE', 'Top ratings and great service')}</OText>
41
- <ScrollView
42
- showsHorizontalScrollIndicator={false}
43
- nestedScrollEnabled
44
- horizontal
45
- style={{ height: 300 }}
46
- >
47
- {businessesList.loading ? (
48
- <>
49
- {[
50
- ...Array(10).keys()
51
- ].map((item, i) => (
52
- <Placeholder
53
- Animation={Fade}
54
- key={i}
55
- style={{
56
- marginTop: 20,
57
- width: windowWidth - 100,
58
- paddingHorizontal: 5,
59
- height: '100%'
60
- }}>
61
- <View style={{ width: '100%' }}>
62
- <PlaceholderLine
63
- height={150}
64
- style={{ marginBottom: 20, borderRadius: 8 }}
65
- />
66
- <View style={{ paddingHorizontal: 10 }}>
67
- <View
68
- style={{
69
- flexDirection: 'row',
70
- justifyContent: 'space-between',
71
- }}>
72
- <PlaceholderLine
73
- height={15}
74
- width={40}
75
- style={{ marginBottom: 15 }}
76
- />
77
- <PlaceholderLine
78
- height={15}
79
- width={20}
80
- style={{ marginBottom: 15 }}
81
- />
82
- </View>
38
+
39
+ {businessesList.loading ? (
40
+ <>
41
+ <ScrollView
42
+ showsHorizontalScrollIndicator={false}
43
+ nestedScrollEnabled
44
+ horizontal
45
+ style={{ height: 300, paddingHorizontal: 40 }}
46
+ >
47
+ {[
48
+ ...Array(10).keys()
49
+ ].map((item, i) => (
50
+ <Placeholder
51
+ Animation={Fade}
52
+ key={i}
53
+ style={{
54
+ marginTop: 20,
55
+ width: windowWidth - 100,
56
+ paddingHorizontal: 5,
57
+ height: '100%'
58
+ }}>
59
+ <View style={{ width: '100%' }}>
60
+ <PlaceholderLine
61
+ height={150}
62
+ style={{ marginBottom: 20, borderRadius: 8 }}
63
+ />
64
+ <View style={{ paddingHorizontal: 10 }}>
65
+ <View
66
+ style={{
67
+ flexDirection: 'row',
68
+ justifyContent: 'space-between',
69
+ }}>
83
70
  <PlaceholderLine
84
71
  height={15}
85
- width={30}
86
- style={{ marginBottom: 10 }}
72
+ width={40}
73
+ style={{ marginBottom: 15 }}
87
74
  />
88
75
  <PlaceholderLine
89
76
  height={15}
90
- width={80}
91
- style={{ marginBottom: 10 }}
77
+ width={20}
78
+ style={{ marginBottom: 15 }}
92
79
  />
93
80
  </View>
81
+ <PlaceholderLine
82
+ height={15}
83
+ width={30}
84
+ style={{ marginBottom: 10 }}
85
+ />
86
+ <PlaceholderLine
87
+ height={15}
88
+ width={80}
89
+ style={{ marginBottom: 10 }}
90
+ />
94
91
  </View>
95
- </Placeholder>
96
- ))}
97
- </>
98
- ) : (
99
- <>
100
- {businessesList.businesses.length > 0 ? (
101
- businessesList.businesses?.map(
102
- (business: any) => (
103
- <View
104
- key={business.id}
105
- style={{
106
- width: windowWidth - 100,
107
- paddingHorizontal: 5,
108
- height: '100%'
109
- }}
110
- >
111
- <BusinessController
112
- business={business}
113
- isBusinessOpen={business?.open}
114
- handleCustomClick={onBusinessClick}
115
- orderType={orderState?.options?.type}
116
- navigation={navigation}
117
- />
118
- </View>
92
+ </View>
93
+ </Placeholder>
94
+ ))}
95
+ </ScrollView>
96
+ </>
97
+ ) : (
98
+ <>
99
+ {businessesList.businesses.length > 0 && (
100
+ <ListWrapper>
101
+ <OText size={16} mBottom={5} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('HIGHEST_RATED', 'Highest rated')}</OText>
102
+ <OText size={12}>{t('TOP_RATINGS_AND_GREAT_SERVICE', 'Top ratings and great service')}</OText>
103
+ <ScrollView
104
+ showsHorizontalScrollIndicator={false}
105
+ nestedScrollEnabled
106
+ horizontal
107
+ style={{ height: 300 }}
108
+ >
109
+ {
110
+ businessesList.businesses?.map(
111
+ (business: any) => (
112
+ <View
113
+ key={business.id}
114
+ style={{
115
+ width: windowWidth - 100,
116
+ paddingHorizontal: 5,
117
+ height: '100%'
118
+ }}
119
+ >
120
+ <BusinessController
121
+ business={business}
122
+ isBusinessOpen={business?.open}
123
+ handleCustomClick={onBusinessClick}
124
+ orderType={orderState?.options?.type}
125
+ navigation={navigation}
126
+ />
127
+ </View>
128
+ )
119
129
  )
120
- )
121
- ) : (
122
- <NotFoundSource />
123
- )}
124
- </>
130
+ }
131
+ </ScrollView>
132
+ </ListWrapper>
125
133
  )}
126
- </ScrollView>
127
- </ListWrapper>
134
+ </>
135
+ )}
128
136
  </>
129
137
  )
130
138
  }
131
139
 
132
140
  export const HighestRatedBusinesses = (props: any) => {
133
- const highestRatedBusinessesProps = {
134
- ...props,
135
- UIComponent: HighestRatedBusinessesUI,
141
+ const highestRatedBusinessesProps = {
142
+ ...props,
143
+ UIComponent: HighestRatedBusinessesUI,
136
144
  initialOrderByValue: 'rating'
137
- };
145
+ };
138
146
 
139
- return <BusinessesListingController {...highestRatedBusinessesProps} />;
147
+ return <BusinessesListingController {...highestRatedBusinessesProps} />;
140
148
  };
@@ -36,7 +36,7 @@ export const Home = (props: any) => {
36
36
  {t('WELCOME', 'Welcome!')}
37
37
  </OText>
38
38
  <OText color={theme.colors.white} size={14} style={{ marginBottom: 46 }}>
39
- {t('LETS_START_ORDER', "Let's start to order now")}
39
+ {t('SUBTITLE_HOME', "Let's start to order now")}
40
40
  </OText>
41
41
  <OButton
42
42
  text={t('LOGIN_NOW', 'Login now')}