fix: join children in copyable codeblock
This commit is contained in:
parent
da0ee1382b
commit
320dab1d4f
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ export default function Code(props: Props) {
|
||||||
'inline-flex items-center justify-center'
|
'inline-flex items-center justify-center'
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigator.clipboard.writeText(props.children as string)
|
navigator.clipboard.writeText(props.children.join(''))
|
||||||
toast('Copied to clipboard')
|
toast('Copied to clipboard')
|
||||||
setIsCopied(true)
|
setIsCopied(true)
|
||||||
setTimeout(() => setIsCopied(false), 1000)
|
setTimeout(() => setIsCopied(false), 1000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue