MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / handler

Function handler

src/components/MarketsPanel.tsx:106–108  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

104 useEffect(() => {
105 if (!expanded) return;
106 const handler = (e: KeyboardEvent) => {
107 if (e.key === "Escape") setExpanded(false);
108 };
109 document.addEventListener("keydown", handler);
110 return () => document.removeEventListener("keydown", handler);
111 }, [expanded]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected