MCPcopy Create free account
hub / github.com/StaticMania/keep-react / copyToClipboard

Function copyToClipboard

hooks/useCopy.tsx:10–20  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

8 }, 3000)
9 }
10 const copyToClipboard = (text: string) => {
11 navigator?.clipboard
12 ?.writeText(text)
13 .then(() => {
14 setCopy(true)
15 })
16 .catch((error) => {
17 console.error(error)
18 setCopy(false)
19 })
20 }
21 return {
22 copy,
23 copyToClipboard,

Callers 4

HeroFunction · 0.85
CodeHighlightFunction · 0.85
CodeBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected