MCPcopy
hub / github.com/wavetermdev/waveterm / onClick

Function onClick

frontend/app/element/markdown.tsx:48–55  ·  view source on GitHub ↗
(e: React.MouseEvent)

Source from the content-addressed store, hash-verified

46 setFocusedHeading: (href: string) => void;
47}) => {
48 const onClick = (e: React.MouseEvent) => {
49 e.preventDefault();
50 if (props.href.startsWith("#")) {
51 setFocusedHeading(props.href);
52 } else {
53 openLink(props.href);
54 }
55 };
56 return (
57 <a href={props.href} onClick={onClick} className="text-accent hover:underline">
58 {props.children}

Callers 1

handleOnClickFunction · 0.70

Calls 1

openLinkFunction · 0.90

Tested by

no test coverage detected