We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74cf418 commit 89e9088Copy full SHA for 89e9088
packages/app/utils/window.ts
@@ -1,7 +1,3 @@
1
-const windowFocusHook = createEventHook<void>()
2
-
3
-useEventListener('focus', () => {
4
- windowFocusHook.trigger()
5
-})
6
7
-export const onWindowFocus = windowFocusHook.on
+export function onWindowFocus(cb: () => unknown) {
+ useEventListener('focus', cb)
+}
0 commit comments