ordering-ui-react-native 0.17.17 → 0.17.18

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.17.17",
3
+ "version": "0.17.18",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -28,46 +28,48 @@ export const OrderItAgain = (props: OrderItAgainParams) => {
28
28
  const { width } = Dimensions.get('window');
29
29
  const productsFilterd = productList?.length > 0 && productList?.sort((a: any, b:any) => moment(b?.last_ordered_date).valueOf() - moment(a?.last_ordered_date).valueOf()).filter((product : any) => product?.name?.toLowerCase()?.includes(searchValue?.toLowerCase()))
30
30
  return (
31
- <Container hide={productsFilterd?.length === 0}>
32
- <OText
33
- size={16}
34
- lineHeight={24}
35
- color={theme.colors.textNormal}
36
- style={{
37
- fontWeight: '600',
38
- marginBottom: 6
39
- }}
40
- >
41
- {t('ORDER_IT_AGAIN', 'Order it again')}
42
- </OText>
43
- <OText
44
- size={12}
45
- lineHeight={18}
46
- color={theme.colors.disabled}
47
- >
48
- {t('ORDER_IT_AGAIN_DESC', 'Quickly add items from your past orders.')}
49
- </OText>
50
- <ScrollView
51
- horizontal
52
- showsVerticalScrollIndicator={false}
53
- showsHorizontalScrollIndicator={false}
54
- >
55
- {productsFilterd.map((product: any, i: number) => (
56
- <ProductWrapper key={'prod_' + product.id + `_${i}`} style={{ width: width - 120, }}>
57
- <SingleProductCard
58
- isSoldOut={product.inventoried && !product.quantity}
59
- product={product}
60
- businessId={businessId}
61
- categoryState={categoryState}
62
- onProductClick={() => onProductClick(product)}
63
- productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
64
- handleUpdateProducts={handleUpdateProducts}
65
- navigation={navigation}
66
- isPreviously
67
- />
68
- </ProductWrapper>
69
- ))}
70
- </ScrollView>
71
- </Container>
31
+ productsFilterd?.length > 0 ? (
32
+ <Container>
33
+ <OText
34
+ size={16}
35
+ lineHeight={24}
36
+ color={theme.colors.textNormal}
37
+ style={{
38
+ fontWeight: '600',
39
+ marginBottom: 6
40
+ }}
41
+ >
42
+ {t('ORDER_IT_AGAIN', 'Order it again')}
43
+ </OText>
44
+ <OText
45
+ size={12}
46
+ lineHeight={18}
47
+ color={theme.colors.disabled}
48
+ >
49
+ {t('ORDER_IT_AGAIN_DESC', 'Quickly add items from your past orders.')}
50
+ </OText>
51
+ <ScrollView
52
+ horizontal
53
+ showsVerticalScrollIndicator={false}
54
+ showsHorizontalScrollIndicator={false}
55
+ >
56
+ {productsFilterd.map((product: any, i: number) => (
57
+ <ProductWrapper key={'prod_' + product.id + `_${i}`} style={{ width: width - 120, }}>
58
+ <SingleProductCard
59
+ isSoldOut={product.inventoried && !product.quantity}
60
+ product={product}
61
+ businessId={businessId}
62
+ categoryState={categoryState}
63
+ onProductClick={() => onProductClick(product)}
64
+ productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
65
+ handleUpdateProducts={handleUpdateProducts}
66
+ navigation={navigation}
67
+ isPreviously
68
+ />
69
+ </ProductWrapper>
70
+ ))}
71
+ </ScrollView>
72
+ </Container>
73
+ ) : null
72
74
  )
73
75
  }
@@ -72,9 +72,15 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
72
72
  },
73
73
  btnBackArrow: {
74
74
  borderWidth: 0,
75
+ width: 26,
76
+ height: 26,
75
77
  backgroundColor: theme.colors.clear,
78
+ borderColor: theme.colors.clear,
76
79
  shadowColor: theme.colors.clear,
77
- padding: 40,
80
+ paddingLeft: 0,
81
+ paddingRight: 0,
82
+ marginLeft: 20,
83
+ marginBottom: 10
78
84
  },
79
85
  })
80
86