ordering-ui-react-native 0.14.38 → 0.14.41

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.14.38",
3
+ "version": "0.14.41",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -10,7 +10,7 @@ import {
10
10
  useToast,
11
11
  ToastType
12
12
  } from 'ordering-components/native'
13
- import { OButton, OModal, OText } from '../shared'
13
+ import { OButton, OText } from '../shared'
14
14
  import { BusinessBasicInformation } from '../BusinessBasicInformation'
15
15
  import { SearchBar } from '../SearchBar'
16
16
  import { BusinessProductsCategories } from '../BusinessProductsCategories'
@@ -45,7 +45,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
45
45
  errorQuantityProducts,
46
46
  header,
47
47
  logo,
48
- productModal,
49
48
  businessId,
50
49
  categoryId,
51
50
  productId,
@@ -75,7 +74,13 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
75
74
  }
76
75
 
77
76
  const onProductClick = (product: any) => {
78
- setCurProduct(product)
77
+ onRedirect('ProductDetails', {
78
+ product: product,
79
+ businessSlug: business.slug,
80
+ businessId: business.id,
81
+ categoryId: categoryId,
82
+ productId: productId,
83
+ })
79
84
  }
80
85
 
81
86
  const handleCancel = () => {
@@ -89,10 +94,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
89
94
  updateProductModal && updateProductModal(null)
90
95
  }
91
96
 
92
- const handlerProductAction = () => {
93
- handleCloseProductModal()
94
- }
95
-
96
97
  const handleUpsellingPage = () => {
97
98
  onRedirect('CheckoutNavigator', {
98
99
  screen: 'CheckoutPage',
@@ -258,27 +259,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
258
259
  handleClick={() => setOpenUpselling(true)}
259
260
  />
260
261
  )}
261
- <OModal
262
- open={openModalProduct || !!curProduct || (!!productModal.product && !orderState.loading)}
263
- onClose={handleCloseProductModal}
264
- entireModal
265
- customClose
266
- isAvoidKeyBoardView
267
- >
268
- <ProductForm
269
- product={curProduct || productModal.product}
270
- businessSlug={business?.slug}
271
- businessId={businessId || business?.id || productModal?.product?.category?.business_id}
272
- onClose={handleCloseProductModal}
273
- navigation={navigation}
274
- onSave={handlerProductAction}
275
- setProductLogin={setProductLogin}
276
- categoryId={categoryId}
277
- productId={productId}
278
- />
279
- </OModal>
280
262
  {openUpselling && (
281
263
  <UpsellingProducts
264
+ setOpenUpselling={setOpenUpselling}
282
265
  businessId={currentCart?.business_id}
283
266
  business={currentCart?.business}
284
267
  cartProducts={currentCart?.products}
@@ -286,6 +269,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
286
269
  openUpselling={openUpselling}
287
270
  canOpenUpselling={canOpenUpselling}
288
271
  setCanOpenUpselling={setCanOpenUpselling}
272
+ onRedirect={onRedirect}
289
273
  />
290
274
  )}
291
275
  </>
@@ -17,7 +17,6 @@ import { BusinessItemAccordion } from '../BusinessItemAccordion';
17
17
  import { CouponControl } from '../CouponControl';
18
18
 
19
19
  import { OButton, OModal, OText, OInput } from '../shared';
20
- import { ProductForm } from '../ProductForm';
21
20
  import { UpsellingProducts } from '../UpsellingProducts';
22
21
  import { verifyDecimals } from '../../utils';
23
22
  import { useTheme } from 'styled-components/native';
@@ -46,8 +45,6 @@ const CartUI = (props: any) => {
46
45
  const [{ parsePrice, parseNumber, parseDate }] = useUtils()
47
46
  const [validationFields] = useValidationFields()
48
47
 
49
- const [openProduct, setModalIsOpen] = useState(false)
50
- const [curProduct, setCurProduct] = useState<any>(null)
51
48
  const [openUpselling, setOpenUpselling] = useState(false)
52
49
  const [canOpenUpselling, setCanOpenUpselling] = useState(false)
53
50
  const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, data: null })
@@ -64,14 +61,15 @@ const CartUI = (props: any) => {
64
61
  }
65
62
 
66
63
  const handleEditProduct = (product: any) => {
67
- setCurProduct(product)
68
- setModalIsOpen(true)
69
- }
70
-
71
- const handlerProductAction = (product: any) => {
72
- if (Object.keys(product).length) {
73
- setModalIsOpen(false)
74
- }
64
+ props?.onNavigationRedirect &&
65
+ props?.onNavigationRedirect('ProductDetails', {
66
+ businessId: cart?.business_id,
67
+ isCartProduct: true,
68
+ productCart: product,
69
+ businessSlug: cart?.business?.slug,
70
+ categoryId: product?.category_id,
71
+ productId: product?.id,
72
+ })
75
73
  }
76
74
 
77
75
  const handleClearProducts = async () => {
@@ -292,25 +290,6 @@ const CartUI = (props: any) => {
292
290
  </CheckoutAction>
293
291
  )}
294
292
  </BusinessItemAccordion>
295
- <OModal
296
- open={openProduct}
297
- entireModal
298
- customClose
299
- onClose={() => setModalIsOpen(false)}
300
- isAvoidKeyBoardView
301
- >
302
- <ProductForm
303
- isCartProduct
304
- productCart={curProduct}
305
- businessSlug={cart?.business?.slug}
306
- businessId={cart?.business_id}
307
- categoryId={curProduct?.category_id}
308
- productId={curProduct?.id}
309
- onSave={handlerProductAction}
310
- onClose={() => setModalIsOpen(false)}
311
- />
312
-
313
- </OModal>
314
293
 
315
294
  {openUpselling && (
316
295
  <UpsellingProducts
@@ -321,6 +300,8 @@ const CartUI = (props: any) => {
321
300
  cartProducts={cart?.products}
322
301
  canOpenUpselling={canOpenUpselling}
323
302
  setCanOpenUpselling={setCanOpenUpselling}
303
+ setOpenUpselling={setOpenUpselling}
304
+ onRedirect={props.onNavigationRedirect}
324
305
  />
325
306
  )}
326
307
  <OModal
@@ -152,8 +152,8 @@ const CheckoutUI = (props: any) => {
152
152
 
153
153
  const deliveryOptions = instructionsOptions?.result && instructionsOptions?.result?.filter((option: any) => option?.enabled)?.map((option: any) => {
154
154
  return {
155
- value: option?.id, key: option?.id, label: t(option?.name.toUpperCase().replace(/\s/g, '_'), option?.name)
156
- }
155
+ value: option?.id, key: option?.id, label: t(option?.name.toUpperCase().replace(/\s/g, '_'), option?.name)
156
+ }
157
157
  })
158
158
 
159
159
  const handlePlaceOrder = () => {
@@ -241,7 +241,7 @@ const CheckoutUI = (props: any) => {
241
241
  setShowGateway({ open: false, closedByUser: true })
242
242
  }
243
243
 
244
- const changeDeliveryOption = (option : any) => {
244
+ const changeDeliveryOption = (option: any) => {
245
245
  handleChangeDeliveryOption(option)
246
246
  setIsDeliveryOptionModalVisible(false)
247
247
  }
@@ -580,6 +580,7 @@ const CheckoutUI = (props: any) => {
580
580
  cart={cart}
581
581
  isCartPending={cart?.status === 2}
582
582
  isFromCheckout
583
+ onNavigationRedirect={onNavigationRedirect}
583
584
  />
584
585
  </>
585
586
  )}
@@ -766,6 +767,7 @@ const CheckoutUI = (props: any) => {
766
767
  amount: cart?.total,
767
768
  delivery_zone_id: cart?.delivery_zone_id,
768
769
  user_id: user?.id,
770
+ user_name: user?.name
769
771
  },
770
772
  currency: configs?.stripe_currency?.value || currency,
771
773
  userToken: token,
@@ -20,7 +20,6 @@ import {
20
20
  import { ProductItemAccordion } from '../ProductItemAccordion';
21
21
  import { CouponControl } from '../CouponControl';
22
22
  import { OInput, OModal, OText } from '../shared';
23
- import { ProductForm } from '../ProductForm';
24
23
  import { verifyDecimals } from '../../utils';
25
24
  import { useTheme } from 'styled-components/native';
26
25
  import { TaxInformation } from '../TaxInformation';
@@ -36,7 +35,8 @@ const OrderSummaryUI = (props: any) => {
36
35
  isCartPending,
37
36
  isFromCheckout,
38
37
  commentState,
39
- handleChangeComment
38
+ handleChangeComment,
39
+ onNavigationRedirect
40
40
  } = props;
41
41
 
42
42
  const theme = useTheme();
@@ -45,8 +45,6 @@ const OrderSummaryUI = (props: any) => {
45
45
  const [orderState] = useOrder();
46
46
  const [{ parsePrice, parseNumber }] = useUtils();
47
47
  const [validationFields] = useValidationFields();
48
- const [openProduct, setModalIsOpen] = useState(false)
49
- const [curProduct, setCurProduct] = useState<any>(null)
50
48
  const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, data: null })
51
49
 
52
50
  const isCouponEnabled = validationFields?.fields?.checkout?.coupon?.enabled;
@@ -56,14 +54,16 @@ const OrderSummaryUI = (props: any) => {
56
54
  }
57
55
 
58
56
  const handleEditProduct = (product: any) => {
59
- setCurProduct(product)
60
- setModalIsOpen(true)
61
- }
62
-
63
- const handlerProductAction = (product: any) => {
64
- if (Object.keys(product).length) {
65
- setModalIsOpen(false)
66
- }
57
+ onNavigationRedirect &&
58
+ onNavigationRedirect('ProductDetails', {
59
+ isCartProduct: true,
60
+ productCart: product,
61
+ businessSlug: cart?.business?.slug,
62
+ businessId: cart?.business_id,
63
+ categoryId: product?.category_id,
64
+ productId: product?.id,
65
+ isFromCheckout: isFromCheckout,
66
+ })
67
67
  }
68
68
 
69
69
  const getIncludedTaxes = () => {
@@ -223,25 +223,6 @@ const OrderSummaryUI = (props: any) => {
223
223
  )}
224
224
  </OSBill>
225
225
  )}
226
- <OModal
227
- open={openProduct}
228
- entireModal
229
- customClose
230
- onClose={() => setModalIsOpen(false)}
231
- isAvoidKeyBoardView
232
- >
233
- <ProductForm
234
- isCartProduct
235
- productCart={curProduct}
236
- businessSlug={cart?.business?.slug}
237
- businessId={cart?.business_id}
238
- categoryId={curProduct?.category_id}
239
- productId={curProduct?.id}
240
- onSave={handlerProductAction}
241
- onClose={() => setModalIsOpen(false)}
242
- isFromCheckout={isFromCheckout}
243
- />
244
- </OModal>
245
226
  <OModal
246
227
  open={openTaxModal.open}
247
228
  onClose={() => setOpenTaxModal({ open: false, data: null })}
@@ -52,7 +52,6 @@ export const ProductOptionsUI = (props: any) => {
52
52
  handleChangeSuboptionState,
53
53
  handleChangeCommentState,
54
54
  productObject,
55
- onClose,
56
55
  businessSlug
57
56
  } = props
58
57
 
@@ -84,7 +83,6 @@ export const ProductOptionsUI = (props: any) => {
84
83
  }
85
84
 
86
85
  const handleRedirectLogin = (product : any) => {
87
- onClose()
88
86
  navigation.navigate('Login', {product: {businessId: product?.businessId, id: product?.id, categoryId: product?.categoryId, slug: businessSlug} })
89
87
  }
90
88
 
@@ -110,7 +108,7 @@ export const ProductOptionsUI = (props: any) => {
110
108
  name="x"
111
109
  size={35}
112
110
  style={{ color: theme.colors.white, backgroundColor: 'rgba(0,0,0,0.3)' }}
113
- onPress={onClose}
111
+ onPress={props.handleGoBack}
114
112
  />
115
113
  </View>
116
114
  </TopHeader>
@@ -16,7 +16,6 @@ import {
16
16
  AddButton,
17
17
  CloseUpselling
18
18
  } from './styles'
19
- import { ProductForm } from '../ProductForm';
20
19
  import { useTheme } from 'styled-components/native'
21
20
 
22
21
  const UpsellingProductsUI = (props: UpsellingProductsParams) => {
@@ -27,7 +26,9 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
27
26
  handleUpsellingPage,
28
27
  openUpselling,
29
28
  canOpenUpselling,
30
- setCanOpenUpselling
29
+ setCanOpenUpselling,
30
+ onRedirect,
31
+ setOpenUpselling
31
32
  } = props
32
33
 
33
34
  const theme = useTheme();
@@ -53,8 +54,6 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
53
54
  }
54
55
  })
55
56
 
56
- const [actualProduct, setActualProduct] = useState<any>(null)
57
- const [modalIsOpen, setModalIsOpen] = useState(false)
58
57
  const [{ parsePrice }] = useUtils()
59
58
  const [, t] = useLanguage()
60
59
 
@@ -71,13 +70,15 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
71
70
  }, [upsellingProducts.loading, upsellingProducts?.products.length])
72
71
 
73
72
  const handleFormProduct = (product: any) => {
74
- setActualProduct(product)
75
- setModalIsOpen(true)
76
- }
77
-
78
- const handleSaveProduct = () => {
79
- setActualProduct(null)
80
- setModalIsOpen(false)
73
+ setOpenUpselling && setOpenUpselling(false)
74
+ onRedirect && onRedirect('ProductDetails', {
75
+ product: product,
76
+ businessId: product?.api?.businessId,
77
+ businessSlug: business.slug,
78
+ onAction: () => {
79
+ setOpenUpselling && setOpenUpselling(true)
80
+ }
81
+ })
81
82
  }
82
83
 
83
84
  const UpsellingLayout = () => {
@@ -132,13 +133,12 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
132
133
  <>
133
134
  {!canOpenUpselling || upsellingProducts?.products?.length === 0 ? null : (
134
135
  <>
135
- {!modalIsOpen && (
136
136
  <OBottomPopup
137
137
  title={t('WANT_SOMETHING_ELSE', 'Do you want something else?')}
138
138
  open={openUpselling}
139
139
  onClose={() => handleUpsellingPage()}
140
140
  >
141
- <UpsellingLayout />
141
+ <UpsellingLayout />
142
142
  <CloseUpselling>
143
143
  <OButton
144
144
  imgRightSrc=''
@@ -148,28 +148,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
148
148
  />
149
149
  </CloseUpselling>
150
150
  </OBottomPopup>
151
- )}
152
151
  </>
153
152
  )}
154
153
  </>
155
154
  )}
156
- <OModal
157
- open={modalIsOpen}
158
- onClose={() => setModalIsOpen(false)}
159
- entireModal
160
- customClose
161
- isAvoidKeyBoardView
162
- >
163
- {actualProduct && (
164
- <ProductForm
165
- product={actualProduct}
166
- businessId={actualProduct?.api?.businessId}
167
- businessSlug={business.slug}
168
- onSave={() => handleSaveProduct()}
169
- onClose={() => setModalIsOpen(false)}
170
- />
171
- )}
172
- </OModal>
173
155
  </>
174
156
  )
175
157
  }
@@ -408,6 +408,8 @@ export interface UpsellingProductsParams {
408
408
  isCustomMode?: boolean;
409
409
  upsellingProducts?: any;
410
410
  business?: any;
411
+ setOpenUpselling?: any;
412
+ onRedirect?: any;
411
413
  businessId?: number;
412
414
  cartProducts?: Array<any>;
413
415
  handleUpsellingPage: () => void;
@@ -510,6 +510,7 @@ const CheckoutUI = (props: any) => {
510
510
  <WalletPaymentOptionContainer>
511
511
  <PaymentOptionWallet
512
512
  cart={cart}
513
+ businessId={cart?.business_id}
513
514
  />
514
515
  </WalletPaymentOptionContainer>
515
516
  )}
@@ -5,11 +5,11 @@ import { StyleSheet, View } from 'react-native';
5
5
  import { OButton, OIcon, OText } from '../shared';
6
6
  import { LanguageSelector } from '../LanguageSelector';
7
7
  import { TouchableOpacity } from 'react-native-gesture-handler';
8
- import { useWindowDimensions } from 'react-native';
8
+ import { useWindowDimensions, Platform } from 'react-native';
9
9
 
10
10
  export const Home = (props: any) => {
11
11
  const { onNavigationRedirect } = props;
12
- const { width } = useWindowDimensions();
12
+ const { width, height } = useWindowDimensions();
13
13
  const [, t] = useLanguage();
14
14
  const [orderState] = useOrder();
15
15
 
@@ -18,7 +18,9 @@ export const Home = (props: any) => {
18
18
  return (
19
19
  <View style={styles.container}>
20
20
  <View>
21
- <LanguageSelector />
21
+ <View style={{paddingTop: (height <= 756 && Platform.OS !== 'ios') ? (height * 0.05) : 0 }}>
22
+ <LanguageSelector />
23
+ </View>
22
24
  <OIcon
23
25
  src={theme.images.logos.logotypeInvert}
24
26
  style={{
@@ -7,6 +7,7 @@ import {
7
7
  PaymentOptionWallet as PaymentOptionWalletController,
8
8
  useLanguage,
9
9
  useUtils,
10
+ useOrder
10
11
  } from 'ordering-components/native'
11
12
 
12
13
  import {
@@ -18,7 +19,7 @@ import { OText } from '../shared'
18
19
 
19
20
  const PaymentOptionWalletUI = (props: any) => {
20
21
  const {
21
- cart,
22
+ businessId,
22
23
  walletsState,
23
24
  selectWallet,
24
25
  deletetWalletSelected
@@ -26,8 +27,11 @@ const PaymentOptionWalletUI = (props: any) => {
26
27
 
27
28
  const theme = useTheme()
28
29
  const [, t] = useLanguage()
30
+ const [{ carts }] = useOrder()
29
31
  const [{ parsePrice }] = useUtils()
30
32
 
33
+ const cart = carts?.[`businessId:${businessId}`] ?? {}
34
+
31
35
  const styles = StyleSheet.create({
32
36
  checkBoxStyle: {
33
37
  width: 25,
@@ -68,7 +72,7 @@ const PaymentOptionWalletUI = (props: any) => {
68
72
  if (!walletsState.loading && walletsState.result?.length) {
69
73
  setCheckedState(
70
74
  walletsState.result?.map((wallet: any) => {
71
- return !!cart?.wallets?.find((w: any) => w.id === wallet.id)
75
+ return !!cart?.payment_events?.find((w: any) => w.wallet_id === wallet.id)
72
76
  })
73
77
  )
74
78
  }
@@ -32,7 +32,8 @@ import {
32
32
  ProductActions,
33
33
  ExtraOptionWrap,
34
34
  WeightUnitSwitch,
35
- WeightUnitItem
35
+ WeightUnitItem,
36
+ TopActions
36
37
  } from './styles';
37
38
  import { OButton, OIcon, OInput, OText } from '../shared';
38
39
  import { ScrollView } from 'react-native-gesture-handler';
@@ -295,13 +296,9 @@ export const ProductOptionsUI = (props: any) => {
295
296
  return (
296
297
  <SafeAreaView style={{ flex: 1 }}>
297
298
  <TopHeader>
298
- <OButton
299
- imgLeftSrc={theme.images.general.arrow_left}
300
- imgRightSrc={null}
301
- style={styles.btnBackArrow}
302
- onClick={() => handleGoBack()}
303
- imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
304
- />
299
+ <TopActions onPress={() => handleGoBack()}>
300
+ <OIcon src={theme.images.general.arrow_left} width={15} />
301
+ </TopActions>
305
302
  </TopHeader>
306
303
  <ScrollView>
307
304
  {!error && (
@@ -352,15 +349,13 @@ export const ProductOptionsUI = (props: any) => {
352
349
  style={styles.slide1}
353
350
  key={i}
354
351
  >
355
- <Grayscale amount={isSoldOut ? 1 : 0}>
356
- <FastImage
357
- style={{ height: '100%' }}
358
- source={{
359
- uri: optimizeImage(img, 'h_258,c_limit'),
360
- priority: FastImage.priority.normal,
361
- }}
362
- />
363
- </Grayscale>
352
+ <FastImage
353
+ style={{ height: '100%', opacity: isSoldOut ? 0.5 : 1 }}
354
+ source={{
355
+ uri: optimizeImage(img, 'h_258,c_limit'),
356
+ priority: FastImage.priority.normal,
357
+ }}
358
+ />
364
359
  </View>
365
360
  ))}
366
361
  </Swiper>
@@ -384,19 +379,18 @@ export const ProductOptionsUI = (props: any) => {
384
379
  opacity: index === thumbsSwiper ? 1 : 0.8
385
380
  }}
386
381
  >
387
- <Grayscale amount={isSoldOut ? 1 : 0}>
388
- <OIcon
389
- url={img}
390
- style={{
391
- borderColor: theme.colors.lightGray,
392
- borderRadius: 8,
393
- minHeight: '100%'
394
- }}
395
- width={56}
396
- height={56}
397
- cover
398
- />
399
- </Grayscale>
382
+ <OIcon
383
+ url={img}
384
+ style={{
385
+ borderColor: theme.colors.lightGray,
386
+ borderRadius: 8,
387
+ minHeight: '100%',
388
+ opacity: isSoldOut ? 0.5 : 1
389
+ }}
390
+ width={56}
391
+ height={56}
392
+ cover
393
+ />
400
394
  </View>
401
395
  </TouchableOpacity>
402
396
 
@@ -428,12 +422,12 @@ export const ProductOptionsUI = (props: any) => {
428
422
  style={{ flex: 1, marginBottom: 10 }}>
429
423
  {product?.name || productCart.name}
430
424
  </OText>
431
- {product?.calories && (
425
+ {!!product?.calories && (
432
426
  <OText size={16} style={{ color: '#808080' }}>{product?.calories} cal
433
427
  </OText>
434
428
  )}
435
429
  </View>
436
- {((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (product?.estimated_person)) && (
430
+ {((!!product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (!!product?.estimated_person)) && (
437
431
  <OText size={14} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={'#909BA9'} mBottom={7}>
438
432
  {
439
433
  ((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (productCart?.sku && productCart?.sku !== '-1' && productCart?.sku !== '1'))
@@ -452,7 +446,7 @@ export const ProductOptionsUI = (props: any) => {
452
446
  ) : (
453
447
  <View style={{ flexDirection: 'row', marginBottom: 10 }}>
454
448
  <OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
455
- {product?.offer_price && (
449
+ {!!product?.offer_price && (
456
450
  <OText style={{
457
451
  fontSize: 14,
458
452
  color: '#808080',
@@ -466,7 +460,7 @@ export const ProductOptionsUI = (props: any) => {
466
460
  </>
467
461
  )}
468
462
  </ProductTitle>
469
- <ProductDescription>
463
+ <ProductDescription>
470
464
  <OText color={theme.colors.textSecondary} size={12} lineHeight={18}>
471
465
  {product?.description || productCart?.description}
472
466
  </OText>
@@ -481,7 +475,7 @@ export const ProductOptionsUI = (props: any) => {
481
475
  key={tag.id}
482
476
  style={styles.productTagWrapper}
483
477
  >
484
- {tag?.image ? (
478
+ {!!tag?.image ? (
485
479
  <OIcon
486
480
  url={optimizeImage(tag?.image, 'h_40,c_limit')}
487
481
  style={styles.productTagImageStyle}
@@ -764,7 +758,7 @@ export const ProductOptionsUI = (props: any) => {
764
758
  </WrapContent>
765
759
  </View>
766
760
  )}
767
- {error && error.length > 0 && (
761
+ {!!error && error.length > 0 && (
768
762
  <NotFoundSource content={error[0]?.message || error[0]} />
769
763
  )}
770
764
  </ScrollView>
@@ -5,6 +5,12 @@ export const WrapHeader = styled.View`
5
5
  z-index: 1;
6
6
  `
7
7
 
8
+ export const TopActions = styled.TouchableOpacity`
9
+ height: 44px;
10
+ justify-content: center;
11
+ padding-horizontal: 30px;
12
+ `;
13
+
8
14
  export const TopHeader = styled.View`
9
15
  width: 100%;
10
16
  flex-direction: row;