ordering-ui-react-native 0.22.68 → 0.22.70

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.22.68",
3
+ "version": "0.22.70",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -394,7 +394,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
394
394
 
395
395
  useEffect(() => {
396
396
  const unsubcribe = navigation.addListener('focus', () => {
397
- currentTabSelected === 'logisticOrders' && loadLogisticOrders()
397
+ currentTabSelected === 'logisticOrders' && loadLogisticOrders && loadLogisticOrders()
398
398
  })
399
399
  return unsubcribe
400
400
  }, [navigation, loadLogisticOrders])
@@ -457,13 +457,15 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
457
457
  <View style={{ marginRight: 10 }}>
458
458
  <WebsocketStatus />
459
459
  </View>
460
- <FeatherIcon
461
- name='refresh-cw'
462
- color={theme.colors.backgroundDark}
463
- size={24}
464
- onPress={() => { currentTabSelected === 'logisticOrders' ? loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true }) }}
465
- style={{ marginRight: 20 }}
466
- />
460
+ {isNetConnected && (
461
+ <FeatherIcon
462
+ name='refresh-cw'
463
+ color={theme.colors.backgroundDark}
464
+ size={24}
465
+ onPress={() => { currentTabSelected === 'logisticOrders' ? loadLogisticOrders && loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true }) }}
466
+ style={{ marginRight: 20 }}
467
+ />
468
+ )}
467
469
  <FontistoIcon
468
470
  name='search'
469
471
  color={theme.colors.backgroundDark}
@@ -617,7 +619,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
617
619
  refreshControl={
618
620
  <RefreshControl
619
621
  refreshing={refreshing}
620
- onRefresh={() => { isNetConnected && (currentTabSelected === 'logisticOrders' ? loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true })) }}
622
+ onRefresh={() => { isNetConnected && (currentTabSelected === 'logisticOrders' ? loadLogisticOrders && loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true })) }}
621
623
  />
622
624
  }
623
625
  >
@@ -1161,3 +1163,7 @@ export const OrdersOption = (props: OrdersOptionParams) => {
1161
1163
  )}
1162
1164
  </>);
1163
1165
  };
1166
+
1167
+ OrdersOption.defaultProps = {
1168
+ isNetConnected: true
1169
+ }
@@ -452,7 +452,7 @@ export const BusinessBasicInformation = (
452
452
  </BusinessInfoItem>
453
453
  </View>
454
454
  <WrapReviews>
455
- {!isBusinessInfoShow && (
455
+ {!isBusinessInfoShow && !loading && (
456
456
  <>
457
457
  {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
458
458
  <>