mirror of
https://github.com/tale/headplane.git
synced 2026-07-27 16:18:57 +00:00
fix: join children in copyable codeblock
This commit is contained in:
@@ -28,7 +28,7 @@ export default function Code(props: Props) {
|
||||
'inline-flex items-center justify-center'
|
||||
)}
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(props.children as string)
|
||||
navigator.clipboard.writeText(props.children.join(''))
|
||||
toast('Copied to clipboard')
|
||||
setIsCopied(true)
|
||||
setTimeout(() => setIsCopied(false), 1000)
|
||||
|
||||
Reference in New Issue
Block a user