ordering-ui-react-native 0.21.25 → 0.21.27

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.25",
3
+ "version": "0.21.27",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -53,7 +53,6 @@ const NewOrderNotificationUI = (props: any) => {
53
53
  let times = 0
54
54
 
55
55
  const handleCloseEvents = () => {
56
- notificationSound.stop()
57
56
  setCurrentEvent(null)
58
57
  clearInterval(_timeout)
59
58
  }
@@ -73,6 +72,8 @@ const NewOrderNotificationUI = (props: any) => {
73
72
  times++
74
73
  } else {
75
74
  clearInterval(_timeout)
75
+ notificationSound.stop()
76
+ notificationSound.release()
76
77
  return
77
78
  }
78
79
  }, 2500)
@@ -120,7 +121,11 @@ const NewOrderNotificationUI = (props: any) => {
120
121
  }, [])
121
122
 
122
123
  useEffect(() => {
123
- return () => handleCloseEvents()
124
+ return () => {
125
+ handleCloseEvents()
126
+ notificationSound.stop()
127
+ notificationSound.release()
128
+ }
124
129
  }, [])
125
130
 
126
131
  return (