()
| 20 | title = 'code snippet', |
| 21 | }) => { |
| 22 | const handleCopy = async () => { |
| 23 | try { |
| 24 | await navigator.clipboard.writeText(value); |
| 25 | toast({ |
| 26 | title: 'Copied to Clipboard', |
| 27 | }); |
| 28 | } catch (error) { |
| 29 | toast({ |
| 30 | title: '❌ Could Not Access Clipboard', |
| 31 | description: 'Please ensure clipboard permissions are granted.', |
| 32 | variant: 'destructive', |
| 33 | }); |
| 34 | console.error('Failed to copy:', error); |
| 35 | } |
| 36 | }; |
| 37 | |
| 38 | return ( |
| 39 | <div |
nothing calls this directly
no test coverage detected
searching dependent graphs…