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

Function handler

src/components/LivePanel.tsx:64–67  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

62 useEffect(() => {
63 if (!open) return;
64 const handler = (e: MouseEvent) => {
65 if (ref.current && !ref.current.contains(e.target as Node))
66 setOpen(false);
67 };
68 document.addEventListener("mousedown", handler);
69 return () => document.removeEventListener("mousedown", handler);
70 }, [open]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected