(text: string)
| 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, |
no outgoing calls
no test coverage detected