Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);
return () => {
RNCallKeep.removeEventListener('answerCall', answerCall);
RNCallKeep.removeEventListener('didPerformDTMFAction', didPerformDTMFAction);
RNCallKeep.removeEventListener('didReceiveStartCallAction', didReceiveStartCallAction);
RNCallKeep.removeEventListener('didPerformSetMutedCallAction', didPerformSetMutedCallAction);
RNCallKeep.removeEventListener('didToggleHoldCallAction', didToggleHoldCallAction);
RNCallKeep.removeEventListener('endCall', endCall);
}
}, []);