(e: KeyboardEvent)
| 44 | useEffect(() => { |
| 45 | if (!isOpen) return; |
| 46 | const onKey = (e: KeyboardEvent) => { |
| 47 | if (e.key === "Escape") onClose(); |
| 48 | }; |
| 49 | document.addEventListener("keydown", onKey); |
| 50 | return () => document.removeEventListener("keydown", onKey); |
| 51 | }, [isOpen, onClose]); |
nothing calls this directly
no outgoing calls
no test coverage detected