ordering-ui-react-native 0.12.74 → 0.12.75

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.12.74",
3
+ "version": "0.12.75",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
package/src/config.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "app_id": "react-native-app",
3
3
  "notification_app": "orderingapp",
4
4
  "app_name": "Ordering",
5
- "project": "reactdemo",
5
+ "project": "demologistic",
6
6
  "api": {
7
7
  "url": "https://apiv4.ordering.co",
8
8
  "language": "en",
@@ -36,6 +36,7 @@ import { UserProfileForm } from './src/components/UserProfileForm';
36
36
  import { VerifyPhone } from './src/components/VerifyPhone';
37
37
  import { DriverMap } from './src/components/DriverMap';
38
38
  import { MapViewUI as MapView } from './src/components/MapView'
39
+ import { NewOrderNotification } from './src/components/NewOrderNotification';
39
40
  //OComponents
40
41
  import {
41
42
  OText,
@@ -74,8 +75,9 @@ export {
74
75
  LoginForm,
75
76
  LogoutButton,
76
77
  MessagesOption,
77
- NotFoundSource,
78
78
  MapView,
79
+ NewOrderNotification,
80
+ NotFoundSource,
79
81
  OrderDetailsBusiness,
80
82
  OrderDetailsDelivery,
81
83
  OrderMessage,
@@ -59,19 +59,19 @@ export const NewOrderNotification = (props: any) => {
59
59
  setModalOpen(false)
60
60
  }
61
61
 
62
- const handleNotification = useCallback((order: any) => {
62
+ const handleNotification = (order: any) => {
63
+ setModalOpen(true)
63
64
  clearInterval(soundTimeout)
64
65
  handlePlayNotificationSound()
65
66
  setNewOrderId(order.id)
66
- setModalOpen(true)
67
- }, [newOrderId, notificationSound, soundTimeout])
67
+ }
68
68
 
69
69
  useEffect(() => {
70
70
  events.on('order_added', handleNotification)
71
71
  return () => {
72
72
  events.off('order_added', handleNotification)
73
73
  }
74
- }, [handleNotification])
74
+ }, [])
75
75
 
76
76
  const handleUpdateOrder = useCallback(async (order: any) => {
77
77
  if (order?.driver) {
@@ -20,7 +20,6 @@ import {
20
20
  } from './styles';
21
21
  import { PreviousOrders } from '../PreviousOrders';
22
22
  import { OrdersOptionParams } from '../../types';
23
- import { NewOrderNotification } from '../NewOrderNotification';
24
23
 
25
24
  import { TouchableOpacity } from 'react-native-gesture-handler';
26
25
  import GestureRecognizer from 'react-native-swipe-gestures';
@@ -549,7 +548,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
549
548
  </View>
550
549
  {/* </GestureRecognizer> */}
551
550
 
552
- <NewOrderNotification />
553
551
  {openModal && (
554
552
  <OModal open={openModal} entireModal customClose>
555
553
  <ModalContainer