ordering-ui-react-native 0.16.6-release → 0.16.7-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.16.6-release",
3
+ "version": "0.16.7-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -138,7 +138,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
138
138
  }
139
139
 
140
140
  const onProductClick = (product: any) => {
141
- const productAddedToCartLength = currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)
141
+ const productAddedToCartLength = currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0) || 0
142
142
  if (product?.type === 'service' && business?.professionals?.length > 0) {
143
143
  setCurrentProduct(product)
144
144
  setOpenService(true)
@@ -1110,7 +1110,7 @@ export const ProductOptionsUI = (props: any) => {
1110
1110
  export const ProductForm = (props: any) => {
1111
1111
  const productOptionsProps = {
1112
1112
  ...props,
1113
- productCart: { quantity: props?.product?.maximum_per_order || props?.product?.minimum_per_order || 1 },
1113
+ productCart: { quantity: props?.product?.minimum_per_order || 1 },
1114
1114
  UIComponent: ProductOptionsUI,
1115
1115
  };
1116
1116