updating on change of the function and looks stable?

This commit is contained in:
Arjun Patel
2022-01-15 22:22:46 -08:00
parent 837caed634
commit ed02ce0cd7
+2 -7
View File
@@ -160,13 +160,7 @@ export default function AudioContextProvider({ children }) {
document.removeEventListener("keydown", handleKeyboardShortcut); document.removeEventListener("keydown", handleKeyboardShortcut);
document.removeEventListener("keyup", handleKeyUp); document.removeEventListener("keyup", handleKeyUp);
}; };
}, [ }, [handleKeyboardShortcut, handleKeyUp]);
teamShortcutMappings,
selectedTeammate,
isMuted,
audioInputDeviceId,
audioOutputDeviceId,
]);
// SECTION: recording // SECTION: recording
async function startRecording() { async function startRecording() {
@@ -206,6 +200,7 @@ export default function AudioContextProvider({ children }) {
toast.success("finished playing"); toast.success("finished playing");
} }
// todo usecallback hook
function handleKeyUp(event) { function handleKeyUp(event) {
console.log("on key up"); console.log("on key up");