(e: KeyboardEvent)
| 8 | useEffect(() => { |
| 9 | if (!active) return |
| 10 | const handler = (e: KeyboardEvent) => { |
| 11 | if (e.key === 'Escape') { |
| 12 | e.stopPropagation() |
| 13 | onEscape() |
| 14 | } |
| 15 | } |
| 16 | window.addEventListener('keydown', handler) |
| 17 | return () => window.removeEventListener('keydown', handler) |
| 18 | }, [active, onEscape]) |
nothing calls this directly
no outgoing calls
no test coverage detected