diff --git a/client/src/components/markdown.tsx b/client/src/components/markdown.tsx index 05ab50c4..06767f71 100644 --- a/client/src/components/markdown.tsx +++ b/client/src/components/markdown.tsx @@ -58,6 +58,7 @@ export function Markdown({ content }: { content: string }) { } }, code(props) { + const [copied, setCopied] = React.useState(false); const { children, className, node, ...rest } = props; const match = /language-(\w+)/.exec(className || ""); @@ -81,20 +82,31 @@ export function Markdown({ content }: { content: string }) { if (isCodeBlock) { return ( - - {String(children).replace(/\n$/, "")} - +
+ + {String(children).replace(/\n$/, "")} + + +
); } else { return ( @@ -210,7 +222,7 @@ export function Markdown({ content }: { content: string }) { ); }, - p({ children,node, ...props }) { + p({ children, node, ...props }) { return (

{children}