(e: KeyboardEvent)
| 16 | useEffect(() => { |
| 17 | if (!isOpen) return; |
| 18 | const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); }; |
| 19 | window.addEventListener('keydown', onKey); |
| 20 | return () => window.removeEventListener('keydown', onKey); |
| 21 | }, [isOpen, onClose]); |
nothing calls this directly
no outgoing calls
no test coverage detected