ordering-ui-react-native 0.14.39 → 0.14.40

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.39",
3
+ "version": "0.14.40",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -349,15 +349,13 @@ export const ProductOptionsUI = (props: any) => {
349
349
  style={styles.slide1}
350
350
  key={i}
351
351
  >
352
- <Grayscale amount={isSoldOut ? 1 : 0}>
353
- <FastImage
354
- style={{ height: '100%' }}
355
- source={{
356
- uri: optimizeImage(img, 'h_258,c_limit'),
357
- priority: FastImage.priority.normal,
358
- }}
359
- />
360
- </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
+ />
361
359
  </View>
362
360
  ))}
363
361
  </Swiper>
@@ -381,19 +379,18 @@ export const ProductOptionsUI = (props: any) => {
381
379
  opacity: index === thumbsSwiper ? 1 : 0.8
382
380
  }}
383
381
  >
384
- <Grayscale amount={isSoldOut ? 1 : 0}>
385
- <OIcon
386
- url={img}
387
- style={{
388
- borderColor: theme.colors.lightGray,
389
- borderRadius: 8,
390
- minHeight: '100%'
391
- }}
392
- width={56}
393
- height={56}
394
- cover
395
- />
396
- </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
+ />
397
394
  </View>
398
395
  </TouchableOpacity>
399
396
 
@@ -425,12 +422,12 @@ export const ProductOptionsUI = (props: any) => {
425
422
  style={{ flex: 1, marginBottom: 10 }}>
426
423
  {product?.name || productCart.name}
427
424
  </OText>
428
- {product?.calories && (
425
+ {!!product?.calories && (
429
426
  <OText size={16} style={{ color: '#808080' }}>{product?.calories} cal
430
427
  </OText>
431
428
  )}
432
429
  </View>
433
- {((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (product?.estimated_person)) && (
430
+ {((!!product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (!!product?.estimated_person)) && (
434
431
  <OText size={14} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={'#909BA9'} mBottom={7}>
435
432
  {
436
433
  ((product?.sku && product?.sku !== '-1' && product?.sku !== '1') || (productCart?.sku && productCart?.sku !== '-1' && productCart?.sku !== '1'))
@@ -449,7 +446,7 @@ export const ProductOptionsUI = (props: any) => {
449
446
  ) : (
450
447
  <View style={{ flexDirection: 'row', marginBottom: 10 }}>
451
448
  <OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
452
- {product?.offer_price && (
449
+ {!!product?.offer_price && (
453
450
  <OText style={{
454
451
  fontSize: 14,
455
452
  color: '#808080',
@@ -463,7 +460,7 @@ export const ProductOptionsUI = (props: any) => {
463
460
  </>
464
461
  )}
465
462
  </ProductTitle>
466
- <ProductDescription>
463
+ <ProductDescription>
467
464
  <OText color={theme.colors.textSecondary} size={12} lineHeight={18}>
468
465
  {product?.description || productCart?.description}
469
466
  </OText>
@@ -478,7 +475,7 @@ export const ProductOptionsUI = (props: any) => {
478
475
  key={tag.id}
479
476
  style={styles.productTagWrapper}
480
477
  >
481
- {tag?.image ? (
478
+ {!!tag?.image ? (
482
479
  <OIcon
483
480
  url={optimizeImage(tag?.image, 'h_40,c_limit')}
484
481
  style={styles.productTagImageStyle}
@@ -761,7 +758,7 @@ export const ProductOptionsUI = (props: any) => {
761
758
  </WrapContent>
762
759
  </View>
763
760
  )}
764
- {error && error.length > 0 && (
761
+ {!!error && error.length > 0 && (
765
762
  <NotFoundSource content={error[0]?.message || error[0]} />
766
763
  )}
767
764
  </ScrollView>