ordering-ui-react-native 0.16.82-release → 0.16.83-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.82-release",
3
+ "version": "0.16.83-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -188,13 +188,15 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
188
188
  setOpenUpselling(false)
189
189
  setCanOpenUpselling(false)
190
190
  const cartsAvailable: any = Object.values(orderState?.carts)?.filter((cart: any) => cart?.valid && cart?.status !== 2)
191
- if (cartsAvailable.length === 1) {
191
+ if (cartsAvailable.length === 1 || !isCheckoutMultiBusinessEnabled) {
192
+ const cart = isCheckoutMultiBusinessEnabled ? cartsAvailable[0] : currentCart
193
+
192
194
  props.onNavigationRedirect('CheckoutNavigator', {
193
195
  screen: 'CheckoutPage',
194
- cartUuid: cartsAvailable[0]?.uuid,
195
- businessLogo: cartsAvailable[0]?.business?.logo,
196
- businessName: cartsAvailable[0]?.business?.name,
197
- cartTotal: cartsAvailable[0]?.total
196
+ cartUuid: cart?.uuid,
197
+ businessLogo: cart?.business?.logo,
198
+ businessName: cart?.business?.name,
199
+ cartTotal: cart?.total
198
200
  })
199
201
  } else {
200
202
  const groupKeys: any = {}