ordering-ui-react-native 0.17.61 → 0.17.63

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 (28) hide show
  1. package/package.json +1 -1
  2. package/themes/original/src/components/AddressDetails/index.tsx +9 -7
  3. package/themes/original/src/components/AddressForm/index.tsx +7 -1
  4. package/themes/original/src/components/BusinessController/index.tsx +66 -40
  5. package/themes/original/src/components/BusinessController/styles.tsx +1 -1
  6. package/themes/original/src/components/BusinessListingSearch/index.tsx +27 -11
  7. package/themes/original/src/components/BusinessProductsList/index.tsx +10 -8
  8. package/themes/original/src/components/BusinessProductsListing/index.tsx +1 -1
  9. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +17 -44
  10. package/themes/original/src/components/Checkout/index.tsx +36 -53
  11. package/themes/original/src/components/Checkout/styles.tsx +4 -2
  12. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  13. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  14. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  15. package/themes/original/src/components/MyOrders/index.tsx +42 -42
  16. package/themes/original/src/components/ProductForm/index.tsx +9 -5
  17. package/themes/original/src/components/ProductForm/styles.tsx +2 -4
  18. package/themes/original/src/components/ProductItemAccordion/index.tsx +8 -8
  19. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  20. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  21. package/themes/original/src/components/Promotions/index.tsx +232 -219
  22. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  23. package/themes/original/src/components/SingleProductCard/index.tsx +17 -21
  24. package/themes/original/src/components/SingleProductCard/styles.tsx +1 -0
  25. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  26. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  27. package/themes/original/src/layouts/Container.tsx +1 -1
  28. package/themes/original/src/types/index.tsx +4 -0
@@ -1,15 +1,17 @@
1
1
  import React, { useState } from 'react'
2
2
  import { PromotionsController, useLanguage, useUtils } from 'ordering-components/native'
3
+ import FastImage from 'react-native-fast-image'
3
4
  import {
4
- PromotionsContainer,
5
- SingleOfferContainer,
6
- OfferInformation,
7
- SearchBarContainer,
8
- SingleBusinessOffer,
9
- AvailableBusinesses,
10
- OfferData,
11
- Code,
12
- BusinessInfo
5
+ PromotionsContainer,
6
+ SingleOfferContainer,
7
+ OfferInformation,
8
+ SearchBarContainer,
9
+ SingleBusinessOffer,
10
+ AvailableBusinesses,
11
+ OfferData,
12
+ Code,
13
+ BusinessInfo,
14
+ WrapperSingleOffer
13
15
  } from './styles'
14
16
  import { SearchBar } from '../SearchBar'
15
17
  import NavBar from '../NavBar'
@@ -18,233 +20,244 @@ import { OButton, OIcon, OModal, OText } from '../shared'
18
20
  import { Placeholder, PlaceholderLine } from 'rn-placeholder'
19
21
  import { NotFoundSource } from '../NotFoundSource'
20
22
  import { View, StyleSheet, ScrollView, Platform, RefreshControl } from 'react-native'
21
- import FastImage from 'react-native-fast-image'
22
23
  import { PromotionParams } from '../../types'
23
24
  import { Container } from '../../layouts/Container'
24
25
 
25
26
  const PromotionsUI = (props: PromotionParams) => {
26
- const {
27
- navigation,
28
- offersState,
29
- handleSearchValue,
30
- searchValue,
31
- loadOffers,
32
- offerSelected,
33
- setOfferSelected
34
- } = props
27
+ const {
28
+ navigation,
29
+ offersState,
30
+ handleSearchValue,
31
+ searchValue,
32
+ loadOffers,
33
+ offerSelected,
34
+ setOfferSelected
35
+ } = props
35
36
 
36
- const theme = useTheme();
37
+ const theme = useTheme();
37
38
 
38
- const styles = StyleSheet.create({
39
- productStyle: {
40
- width: 75,
41
- height: 75,
42
- borderRadius: 7.6
43
- },
44
- buttonStyle: {
45
- width: 55,
46
- height: 25,
47
- paddingLeft: 0,
48
- paddingRight: 0
49
- },
50
- offerTitle: {
51
- fontSize: 12
52
- },
53
- offerDescription: {
54
- color: '#909BA9',
55
- fontSize: 10
56
- },
57
- offerExtraInfo: {
58
- fontSize: 10
59
- },
60
- modalButtonStyle: {
61
- width: 100,
62
- height: 35,
63
- paddingLeft: 0,
64
- paddingRight: 0,
65
- borderRadius: 7.6
66
- }
67
- });
39
+ const styles = StyleSheet.create({
40
+ productStyle: {
41
+ width: 75,
42
+ height: 75,
43
+ borderRadius: 7.6
44
+ },
45
+ buttonStyle: {
46
+ width: '100%',
47
+ height: 35,
48
+ paddingLeft: 0,
49
+ paddingRight: 0,
50
+ borderRadius: 8
51
+ },
52
+ offerTitle: {
53
+ fontSize: 14
54
+ },
55
+ offerDescription: {
56
+ color: '#909BA9',
57
+ fontSize: 12
58
+ },
59
+ offerExtraInfo: {
60
+ fontSize: 12
61
+ },
62
+ modalButtonStyle: {
63
+ width: 100,
64
+ height: 35,
65
+ paddingLeft: 0,
66
+ paddingRight: 0,
67
+ borderRadius: 7.6
68
+ }
69
+ });
68
70
 
69
- const [, t] = useLanguage()
70
- const [{ parseDate, parsePrice, optimizeImage }] = useUtils()
71
- const [openModal, setOpenModal] = useState(false)
72
- const [refreshing] = useState(false);
71
+ const [, t] = useLanguage()
72
+ const [{ parseDate, parsePrice, optimizeImage }] = useUtils()
73
+ const [openModal, setOpenModal] = useState(false)
74
+ const [refreshing] = useState(false);
73
75
 
74
- const handleClickOffer = (offer: any) => {
75
- setOpenModal(true)
76
- setOfferSelected(offer)
77
- }
76
+ const handleClickOffer = (offer: any) => {
77
+ setOpenModal(true)
78
+ setOfferSelected(offer)
79
+ }
78
80
 
79
- const handleBusinessClick = (store: any) => {
80
- setOpenModal(false)
81
- navigation.navigate('Business', { store: store.slug })
82
- }
81
+ const handleBusinessClick = (store: any) => {
82
+ setOpenModal(false)
83
+ navigation.navigate('Business', { store: store.slug })
84
+ }
83
85
 
84
- const handleOnRefresh = () => {
85
- if (!offersState.loading) {
86
- loadOffers();
87
- }
86
+ const handleOnRefresh = () => {
87
+ if (!offersState.loading) {
88
+ loadOffers();
88
89
  }
90
+ }
89
91
 
90
- const filteredOffers = offersState?.offers?.filter((offer: any) => offer.name.toLowerCase().includes(searchValue.toLowerCase()))
91
- const targetString = offerSelected?.target === 1
92
- ? t('SUBTOTAL', 'Subtotal')
93
- : offerSelected?.target === 2
94
- ? t('DELIVERY_FEE', 'Delivery fee')
95
- : t('SERVICE_FEE', 'Service fee')
92
+ const filteredOffers = offersState?.offers?.filter((offer: any) => offer.name.toLowerCase().includes(searchValue.toLowerCase()))
93
+ const targetString = offerSelected?.target === 1
94
+ ? t('SUBTOTAL', 'Subtotal')
95
+ : offerSelected?.target === 2
96
+ ? t('DELIVERY_FEE', 'Delivery fee')
97
+ : t('SERVICE_FEE', 'Service fee')
96
98
 
97
- return (
98
- <Container
99
- noPadding
100
- refreshControl={
101
- <RefreshControl
102
- refreshing={refreshing}
103
- onRefresh={() => handleOnRefresh()}
99
+ return (
100
+ <Container
101
+ noPadding
102
+ refreshControl={
103
+ <RefreshControl
104
+ refreshing={refreshing}
105
+ onRefresh={() => handleOnRefresh()}
106
+ />
107
+ }
108
+ >
109
+ <NavBar
110
+ title={t('PROMOTIONS', 'Promotions')}
111
+ titleAlign={'center'}
112
+ onActionLeft={() => navigation.goBack()}
113
+ showCall={false}
114
+ style={{ paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginLeft: 20 }}
115
+ />
116
+ <PromotionsContainer>
117
+ <SearchBarContainer>
118
+ <SearchBar
119
+ placeholder={t('SEARCH_OFFERS', 'Search offers')}
120
+ onSearch={handleSearchValue}
121
+ />
122
+ </SearchBarContainer>
123
+
124
+ {offersState?.loading && (
125
+ <>
126
+ {[...Array(5).keys()].map((key, i) => (
127
+ <Placeholder key={i} style={{ flexDirection: 'row', marginBottom: 20 }}>
128
+ <PlaceholderLine height={10} width={45} />
129
+ <PlaceholderLine height={10} width={60} />
130
+ <PlaceholderLine height={10} width={75} />
131
+ </Placeholder>
132
+ ))}
133
+ </>
134
+ )}
135
+ {((!offersState?.loading && filteredOffers?.length === 0) || offersState?.error) && (
136
+ <NotFoundSource
137
+ content={offersState?.error || t('NOT_FOUND_OFFERS', 'Not found offers')}
138
+ />
139
+ )}
140
+ <ScrollView>
141
+ {!offersState?.loading && offersState.offers?.length > 0 && filteredOffers?.map((offer: any) => (
142
+ <WrapperSingleOffer key={offer.id}>
143
+ <SingleOfferContainer>
144
+ <FastImage
145
+ style={{ height: 80, width: 80, aspectRatio: 3 / 2, borderRadius: 8 }}
146
+ source={typeof offer?.image !== 'number' ? {
147
+ uri: optimizeImage(offer?.image, 'h_1024,c_limit'),
148
+ priority: FastImage.priority.normal,
149
+ } : theme.images?.dummies?.businessLogo}
104
150
  />
105
- }
151
+ <OfferInformation>
152
+ <OText style={styles.offerTitle} numberOfLines={2}>{offer?.name}</OText>
153
+ {!!offer?.description && (
154
+ <OText style={styles.offerDescription} numberOfLines={2}>{offer?.description}</OText>
155
+ )}
156
+ <OText style={styles.offerExtraInfo}>
157
+ {t('EXPIRES', 'Expires')} {parseDate(offer?.end, { outputFormat: 'MMM DD, YYYY' })}
158
+ </OText>
159
+ <AvailableBusinesses>
160
+ <OText style={styles.offerExtraInfo} numberOfLines={1}>
161
+ {t('APPLY_FOR', 'Apply for')}:
162
+ {offer.businesses.map((business: any, i: number) => (
163
+ <React.Fragment key={i}>{' '}{business?.name}{i + 1 < offer.businesses?.length ? ',' : ''}</React.Fragment>
164
+ ))}
165
+ </OText>
166
+ </AvailableBusinesses>
167
+ </OfferInformation>
168
+ </SingleOfferContainer>
169
+ <OButton
170
+ onClick={() => handleClickOffer(offer)}
171
+ text={t('VIEW', 'View')}
172
+ style={styles.buttonStyle}
173
+ textStyle={{ fontSize: 14, color: '#fff', flexWrap: 'nowrap' }}
174
+ />
175
+ </WrapperSingleOffer>
176
+ ))}
177
+ </ScrollView>
178
+ <OModal
179
+ open={openModal}
180
+ entireModal
181
+ title={``}
182
+ onClose={() => setOpenModal(false)}
106
183
  >
107
- <NavBar
108
- title={t('PROMOTIONS', 'Promotions')}
109
- titleAlign={'center'}
110
- onActionLeft={() => navigation.goBack()}
111
- showCall={false}
112
- style={{ paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginLeft: 20 }}
113
- />
114
- <PromotionsContainer>
115
- <SearchBarContainer>
116
- <SearchBar
117
- placeholder={t('SEARCH_OFFERS', 'Search offers')}
118
- onSearch={handleSearchValue}
119
- />
120
- </SearchBarContainer>
121
-
122
- {offersState?.loading && (
123
- <>
124
- {[...Array(5).keys()].map((key, i) => (
125
- <Placeholder key={i} style={{ flexDirection: 'row', marginBottom: 20 }}>
126
- <PlaceholderLine height={10} width={45} />
127
- <PlaceholderLine height={10} width={60} />
128
- <PlaceholderLine height={10} width={75} />
129
- </Placeholder>
130
- ))}
131
- </>
132
- )}
133
- {((!offersState?.loading && filteredOffers?.length === 0) || offersState?.error) && (
134
- <NotFoundSource
135
- content={offersState?.error || t('NOT_FOUND_OFFERS', 'Not found offers')}
136
- />
137
- )}
138
- <ScrollView>
139
- {!offersState?.loading && offersState.offers?.length > 0 && filteredOffers?.map((offer: any) => (
140
- <SingleOfferContainer key={offer.id}>
141
- <OfferInformation>
142
- <OText style={styles.offerTitle} numberOfLines={2}>{offer?.name}</OText>
143
- {!!offer?.description && (
144
- <OText style={styles.offerDescription} numberOfLines={2}>{offer?.description}</OText>
145
- )}
146
- <OText style={styles.offerExtraInfo}>
147
- {t('EXPIRES', 'Expires')} {parseDate(offer?.end, { outputFormat: 'MMM DD, YYYY' })}
148
- </OText>
149
- <AvailableBusinesses>
150
- <OText style={styles.offerExtraInfo} numberOfLines={1}>
151
- {t('APPLY_FOR', 'Apply for')}:
152
- {offer.businesses.map((business: any, i: number) => (
153
- <React.Fragment key={i}>{' '}{business?.name}{i + 1 < offer.businesses?.length ? ',' : ''}</React.Fragment>
154
- ))}
155
- </OText>
156
- </AvailableBusinesses>
157
- </OfferInformation>
158
- <OButton
159
- onClick={() => handleClickOffer(offer)}
160
- text={t('VIEW', 'View')}
161
- style={styles.buttonStyle}
162
- textStyle={{ fontSize: 10, color: '#fff', flexWrap: 'nowrap' }}
163
- />
164
- </SingleOfferContainer>
165
- ))}
166
- </ScrollView>
167
- <OModal
168
- open={openModal}
169
- onClose={() => setOpenModal(false)}
170
- entireModal
171
-
172
- title={``}
173
- >
174
- <View style={{ padding: 20 }}>
175
- <OText style={{ alignSelf: 'center', fontWeight: '700' }} mBottom={20}>
176
- {offerSelected?.name} / {t('VALUE_OF_OFFER', 'Value of offer')}: {offerSelected?.rate_type === 1 ? `${offerSelected?.rate}%` : `${parsePrice(offerSelected?.rate)}`}
177
- </OText>
178
- <OfferData>
179
- {offerSelected?.type === 2 && (
180
- <Code>
181
- <OText>{t('YOUR_CODE', 'Your code')}</OText>
182
- <OText color={theme.colors.primary}>{offerSelected.coupon}</OText>
183
- </Code>
184
- )}
185
- <OText>{t('APPLIES_TO', 'Applies to')}: {targetString}</OText>
186
- {offerSelected?.auto && (
187
- <OText>{t('OFFER_AUTOMATIC', 'This offer applies automatic')}</OText>
188
- )}
189
- {!!offerSelected?.minimum && (
190
- <OText>{t('MINIMUM_PURCHASE_FOR_OFFER', 'Minimum purchase for use this offer')}: {parsePrice(offerSelected?.minimum)}</OText>
191
- )}
192
- {!!offerSelected?.max_discount && (
193
- <OText>{t('MAX_DISCOUNT_ALLOWED', 'Max discount allowed')}: {parsePrice(offerSelected?.max_discount)}</OText>
194
- )}
195
- {!!offerSelected?.description && (
196
- <OText>{offerSelected?.description}</OText>
197
- )}
198
- </OfferData>
199
- <OText style={{ marginTop: 10, marginBottom: 10 }}>
200
- {t('AVAILABLE_BUSINESSES_FOR_OFFER', 'Available businesses for this offer')}:
201
- </OText>
202
- <ScrollView style={{ height: '75%' }}>
203
- {offerSelected?.businesses?.map((business: any) => {
204
- return (
205
- <SingleBusinessOffer key={business.id}>
206
- {business?.logo ? (
207
- <FastImage
208
- style={styles.productStyle}
209
- source={{
210
- uri: optimizeImage(business?.logo, 'h_250,c_limit'),
211
- priority: FastImage.priority.normal,
212
- }}
213
- resizeMode={FastImage.resizeMode.cover}
214
- />
215
- ) : (
216
- <OIcon
217
- src={theme?.images?.dummies?.product}
218
- style={styles.productStyle}
219
- />
220
- )}
221
- <BusinessInfo>
222
- <OText style={{ maxWidth: '60%' }}>{business.name}</OText>
223
- <OButton
224
- onClick={() => handleBusinessClick(business)}
225
- text={t('GO_TO_BUSINESSS', 'Go to business')}
226
- style={styles.modalButtonStyle}
227
- textStyle={{ fontSize: 10, color: '#fff' }}
228
- />
229
- </BusinessInfo>
230
- </SingleBusinessOffer>
231
- )
232
- })}
233
- </ScrollView>
234
- </View>
235
- </OModal>
236
- </PromotionsContainer>
237
- </Container>
238
- )
184
+ <View style={{ padding: 20 }}>
185
+ <OText style={{ alignSelf: 'center', fontWeight: '700' }} mBottom={20}>
186
+ {offerSelected?.name} / {t('VALUE_OF_OFFER', 'Value of offer')}: {offerSelected?.rate_type === 1 ? `${offerSelected?.rate}%` : `${parsePrice(offerSelected?.rate)}`}
187
+ </OText>
188
+ <OfferData>
189
+ {offerSelected?.type === 2 && (
190
+ <Code>
191
+ <OText>{t('YOUR_CODE', 'Your code')}</OText>
192
+ <OText color={theme.colors.primary}>{offerSelected.coupon}</OText>
193
+ </Code>
194
+ )}
195
+ <OText>{t('APPLIES_TO', 'Applies to')}: {targetString}</OText>
196
+ {offerSelected?.auto && (
197
+ <OText>{t('OFFER_AUTOMATIC', 'This offer applies automatic')}</OText>
198
+ )}
199
+ {!!offerSelected?.minimum && (
200
+ <OText>{t('MINIMUM_PURCHASE_FOR_OFFER', 'Minimum purchase for use this offer')}: {parsePrice(offerSelected?.minimum)}</OText>
201
+ )}
202
+ {!!offerSelected?.max_discount && (
203
+ <OText>{t('MAX_DISCOUNT_ALLOWED', 'Max discount allowed')}: {parsePrice(offerSelected?.max_discount)}</OText>
204
+ )}
205
+ {!!offerSelected?.description && (
206
+ <OText>{offerSelected?.description}</OText>
207
+ )}
208
+ </OfferData>
209
+ <OText style={{ marginTop: 10, marginBottom: 10 }}>
210
+ {t('AVAILABLE_BUSINESSES_FOR_OFFER', 'Available businesses for this offer')}:
211
+ </OText>
212
+ <ScrollView
213
+ showsVerticalScrollIndicator={false}
214
+ style={{ height: '75%' }}
215
+ >
216
+ {offerSelected?.businesses?.map((business: any) => {
217
+ return (
218
+ <SingleBusinessOffer key={business.id}>
219
+ {business?.logo ? (
220
+ <FastImage
221
+ style={styles.productStyle}
222
+ source={{
223
+ uri: optimizeImage(business?.logo, 'h_250,c_limit'),
224
+ priority: FastImage.priority.normal,
225
+ }}
226
+ resizeMode={FastImage.resizeMode.cover}
227
+ />
228
+ ) : (
229
+ <OIcon
230
+ src={theme?.images?.dummies?.product}
231
+ style={styles.productStyle}
232
+ />
233
+ )}
234
+ <BusinessInfo>
235
+ <OText style={{ maxWidth: '60%' }}>{business.name}</OText>
236
+ <OButton
237
+ onClick={() => handleBusinessClick(business)}
238
+ text={t('GO_TO_BUSINESSS', 'Go to business')}
239
+ style={styles.modalButtonStyle}
240
+ textStyle={{ fontSize: 10, color: '#fff' }}
241
+ />
242
+ </BusinessInfo>
243
+ </SingleBusinessOffer>
244
+ )
245
+ })}
246
+ </ScrollView>
247
+ </View>
248
+ </OModal>
249
+ </PromotionsContainer>
250
+ </Container>
251
+ )
239
252
  }
240
253
 
241
254
  export const Promotions = (props: PromotionParams) => {
242
- const PromotionsProps = {
243
- ...props,
244
- UIComponent: PromotionsUI
245
- }
255
+ const PromotionsProps = {
256
+ ...props,
257
+ UIComponent: PromotionsUI
258
+ }
246
259
 
247
- return (
248
- <PromotionsController {...PromotionsProps} />
249
- )
260
+ return (
261
+ <PromotionsController {...PromotionsProps} />
262
+ )
250
263
  }
@@ -6,18 +6,22 @@ export const PromotionsContainer = styled.View`
6
6
  padding-right: 40px;
7
7
  `
8
8
 
9
+ export const WrapperSingleOffer = styled.View`
10
+ flex-direction: column;
11
+ width: 100%;
12
+ `
13
+
9
14
  export const SingleOfferContainer = styled.View`
10
15
  flex-direction: row;
11
16
  width: 100%;
12
17
  justify-content: space-between;
13
18
  align-items: center;
14
19
  margin-bottom: 20px;
15
-
16
20
  `
17
21
 
18
22
  export const OfferInformation = styled.View`
19
23
  justify-content: space-between;
20
- max-width: 75%;
24
+ max-width: 70%;
21
25
  `
22
26
 
23
27
  export const SearchBarContainer = styled.View`
@@ -29,6 +33,7 @@ export const SearchBarContainer = styled.View`
29
33
 
30
34
  export const SingleBusinessOffer = styled.View`
31
35
  flex-direction: row;
36
+ margin-bottom: 10px;
32
37
  `
33
38
 
34
39
  export const AvailableBusinesses = styled.View`
@@ -44,6 +44,9 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
44
44
 
45
45
  const theme = useTheme();
46
46
  const hideAddButton = theme?.business_view?.components?.products?.components?.add_to_cart_button?.hidden ?? true
47
+ const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
48
+
49
+ const textSize = isChewLayout ? 12 : 10
47
50
 
48
51
  const styles = StyleSheet.create({
49
52
  container: {
@@ -77,8 +80,8 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
77
80
  textTransform: 'uppercase',
78
81
  },
79
82
  productStyle: {
80
- width: 75,
81
- height: 75,
83
+ width: 85,
84
+ height: 85,
82
85
  borderRadius: 7.6
83
86
  },
84
87
  quantityContainer: {
@@ -176,7 +179,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
176
179
  <CardInfo>
177
180
  <View style={styles.titleWrapper}>
178
181
  <OText
179
- size={12}
182
+ size={textSize + 2}
180
183
  weight={'500'}
181
184
  numberOfLines={1}
182
185
  ellipsizeMode="tail"
@@ -204,7 +207,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
204
207
  )}
205
208
  </PricesContainer>
206
209
  <OText
207
- size={10}
210
+ size={textSize}
208
211
  numberOfLines={!isPreviously ? 2 : 1}
209
212
  ellipsizeMode="tail"
210
213
  color={theme.colors.textSecondary}
@@ -213,7 +216,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
213
216
  </OText>
214
217
  {isPreviously && (
215
218
  <OText
216
- size={10}
219
+ size={textSize}
217
220
  numberOfLines={1}
218
221
  ellipsizeMode="tail"
219
222
  color={theme.colors.primary}
@@ -230,7 +233,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
230
233
  isCapsule={product?.ribbon?.shape === shape?.capsuleShape}
231
234
  >
232
235
  <OText
233
- size={10}
236
+ size={textSize}
234
237
  weight={'400'}
235
238
  color={theme.colors.white}
236
239
  numberOfLines={2}
@@ -241,21 +244,14 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
241
244
  </OText>
242
245
  </RibbonBox>
243
246
  )}
244
- {product?.images ? (
245
- <FastImage
246
- style={styles.productStyle}
247
- source={{
248
- uri: optimizeImage(product?.images, 'h_250,c_limit'),
249
- priority: FastImage.priority.normal,
250
- }}
251
- resizeMode={FastImage.resizeMode.cover}
252
- />
253
- ) : (
254
- <OIcon
255
- src={theme?.images?.dummies?.product}
256
- style={styles.productStyle}
257
- />
258
- )}
247
+ <FastImage
248
+ style={styles.productStyle}
249
+ source={product?.images ? {
250
+ uri: optimizeImage(product?.images, 'h_250,c_limit'),
251
+ priority: FastImage.priority.normal,
252
+ } : theme?.images?.dummies?.product}
253
+ resizeMode={FastImage.resizeMode.cover}
254
+ />
259
255
  </LogoWrapper>
260
256
 
261
257
  {(isSoldOut || maxProductQuantity <= 0) && (
@@ -3,6 +3,7 @@ import styled, { css } from 'styled-components/native'
3
3
  export const CardInfo = styled.View`
4
4
  padding-start: 3px;
5
5
  flex: 1;
6
+ min-height: 85px;
6
7
  `
7
8
  export const SoldOut = styled.View`
8
9
  position: absolute;
@@ -152,9 +152,11 @@ const UserDetailsUI = (props: any) => {
152
152
  {!(validationFields.loading || formState.loading) && (
153
153
  <UDContainer>
154
154
  <UDHeader>
155
- <OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal}>
156
- {t('CUSTOMER_DETAILS', 'Customer Details')}
157
- </OText>
155
+ {props.HeaderTitle ?? (
156
+ <OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal}>
157
+ {t('CUSTOMER_DETAILS', 'Customer Details')}
158
+ </OText>
159
+ )}
158
160
  {cartStatus !== 2 && !requiredFields && (
159
161
  !isEdit ? (
160
162
  <EditBtn onPress={() => toggleIsEdit()} activeOpacity={0.7}>
@@ -13,7 +13,7 @@ const HeaderTitle = (props: any) => {
13
13
  weight={Platform.OS === 'ios' ? '600' : 'bold'}
14
14
  style={style ?? {
15
15
  marginTop: Platform.OS === 'android' ? 50 : 30,
16
- paddingHorizontal: 40,
16
+ paddingHorizontal: props.ph ?? 40,
17
17
  textTransform: 'capitalize',
18
18
  color: props.titleColor || theme.colors.textNormal,
19
19
  }}
@@ -18,7 +18,7 @@ export const Container = (props: any) => {
18
18
  <View
19
19
  style={{
20
20
  flex: 1,
21
- paddingTop: insets.top,
21
+ paddingTop: props.pt ?? insets.top,
22
22
  backgroundColor: theme.colors.backgroundPage
23
23
  }}
24
24
  >