diff --git a/website/src/useOnKeyUp.hook.ts b/website/src/useOnKeyUp.hook.ts index fd4b3423..ab0e877b 100644 --- a/website/src/useOnKeyUp.hook.ts +++ b/website/src/useOnKeyUp.hook.ts @@ -13,5 +13,5 @@ export const useOnKeyUp = (targetKey: string, callback: () => void) => { return () => { window.removeEventListener("keyup", downHandler); }; - }, []); + }, [callback, targetKey]); };