()
| 9 | |
| 10 | export function CopyButton({ content, className = '' }: CopyButtonProps) { |
| 11 | const handleCopy = async () => { |
| 12 | if (!content) return |
| 13 | const success = await copyToClipboard(content) |
| 14 | if (success) { |
| 15 | toast.success('复制成功') |
| 16 | } else { |
| 17 | console.error('复制失败') |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | return ( |
| 22 | <button |
nothing calls this directly
no test coverage detected