ordering-ui-react-native 0.15.84 → 0.15.85

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.15.84",
3
+ "version": "0.15.85",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react'
1
+ import React, { useEffect, useState } from 'react'
2
2
  import { LanguageSelector as LanguageSelectorController, useOrder } from 'ordering-components/native'
3
3
  import { useTheme } from 'styled-components/native';
4
4
  import { I18nManager, Platform, StyleSheet, View } from 'react-native'
@@ -87,7 +87,11 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
87
87
  changeDirection(Platform.OS === 'ios' ? language : langCode)
88
88
  handleChangeLanguage(Platform.OS === 'ios' ? language : langCode)
89
89
  }
90
-
90
+
91
+ useEffect(() => {
92
+ changeDirection(currentLanguage)
93
+ }, [])
94
+
91
95
  return (
92
96
  <Container>
93
97
  {languagesState?.languages ? (
@@ -239,7 +239,7 @@ const CheckoutUI = (props: any) => {
239
239
 
240
240
  useEffect(() => {
241
241
  if (cart?.products?.length === 0) {
242
- navigation?.canGoBack() && navigation.goBack();
242
+ onNavigationRedirect('Business', { store: cart?.business?.slug })
243
243
  }
244
244
  }, [cart?.products])
245
245
 
@@ -107,10 +107,6 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
107
107
  }
108
108
  }, [upsellingProducts.loading, upsellingProducts?.products.length])
109
109
 
110
- useEffect(() => {
111
- isCheckout && Object.keys(cart).length === 0 && onNavigationRedirect && onNavigationRedirect('MyOrders')
112
- }, [cart, isCheckout])
113
-
114
110
  const handleFormProduct = (product: any) => {
115
111
  onNavigationRedirect && onNavigationRedirect('ProductDetails', {
116
112
  product: product,