From 320dab1d4f21dbf2bfcab042f20a3a53e9f20a0c Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Sat, 30 Nov 2024 15:05:07 -0500 Subject: [PATCH] fix: join children in copyable codeblock --- app/components/Code.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/Code.tsx b/app/components/Code.tsx index d16d7a3..2f7e80b 100644 --- a/app/components/Code.tsx +++ b/app/components/Code.tsx @@ -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)