(e: KeyboardEvent)
| 37 | useEffect(() => { |
| 38 | if (!isOpen) return; |
| 39 | const onKey = (e: KeyboardEvent) => { |
| 40 | if (e.key === "Escape") onClose(); |
| 41 | }; |
| 42 | document.addEventListener("keydown", onKey); |
| 43 | return () => document.removeEventListener("keydown", onKey); |
| 44 | }, [isOpen, onClose]); |
nothing calls this directly
no outgoing calls
no test coverage detected