MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / copyToClipboard

Function copyToClipboard

apps/baseai.dev/src/components/home/hero.tsx:183–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 const [copied, setCopied] = useState(false);
182
183 const copyToClipboard = async () => {
184 try {
185 await navigator.clipboard.writeText(command);
186 setCopied(true);
187 setTimeout(() => setCopied(false), 2000);
188 } catch (err) {
189 console.error('Failed to copy text: ', err);
190 }
191 };
192
193 return (
194 <div

Callers 2

CopyableCommandFunction · 0.70
onCopyFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected