ordering-ui-react-native 0.21.70 → 0.21.71

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.21.70",
3
+ "version": "0.21.71",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -190,13 +190,17 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
190
190
  setOpenService(true)
191
191
  return
192
192
  }
193
- onRedirect('ProductDetails', {
194
- product: product,
195
- businessSlug: business.slug,
196
- businessId: business.id || product?.category?.business_id,
197
- productAddedToCartLength,
198
- isRedirect: false
199
- })
193
+ if (product?.enabled) {
194
+ onRedirect('ProductDetails', {
195
+ product: product,
196
+ businessSlug: business.slug,
197
+ businessId: business.id || product?.category?.business_id,
198
+ productAddedToCartLength,
199
+ isRedirect: false
200
+ })
201
+ } else {
202
+ showToast(ToastType.Error, t('PRODUCT_NOT_FOUND', 'Product not found'))
203
+ }
200
204
  }
201
205
  events.emit('product_clicked', product)
202
206
  }