diff --git a/app/src/util/useListener.ts b/app/src/util/useListener.ts index 9ad23358..9372d4c2 100644 --- a/app/src/util/useListener.ts +++ b/app/src/util/useListener.ts @@ -4,7 +4,7 @@ export function useWindowEvent( type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, deps: DependencyList = [] -) { +): void { useEffect(() => { window.addEventListener(type, listener); return () => window.removeEventListener(type, listener); @@ -15,7 +15,7 @@ export function useDocumentEvent( type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, deps: DependencyList = [] -) { +): void { useEffect(() => { document.addEventListener(type, listener); return () => document.removeEventListener(type, listener);