From ed02ce0cd757e77b4d4be7b4803769a77da3cd1e Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sat, 15 Jan 2022 22:22:46 -0800 Subject: [PATCH] updating on change of the function and looks stable? --- contexts/audioContext.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/contexts/audioContext.tsx b/contexts/audioContext.tsx index ca30f2b..b01dc6e 100644 --- a/contexts/audioContext.tsx +++ b/contexts/audioContext.tsx @@ -160,13 +160,7 @@ export default function AudioContextProvider({ children }) { document.removeEventListener("keydown", handleKeyboardShortcut); document.removeEventListener("keyup", handleKeyUp); }; - }, [ - teamShortcutMappings, - selectedTeammate, - isMuted, - audioInputDeviceId, - audioOutputDeviceId, - ]); + }, [handleKeyboardShortcut, handleKeyUp]); // SECTION: recording async function startRecording() { @@ -206,6 +200,7 @@ export default function AudioContextProvider({ children }) { toast.success("finished playing"); } + // todo usecallback hook function handleKeyUp(event) { console.log("on key up");