mirror of
https://github.com/deiucanta/chatpad.git
synced 2026-03-11 09:04:31 +00:00
fix code copy button
This commit is contained in:
parent
38b585cea9
commit
f0fc9644ec
1 changed files with 1 additions and 7 deletions
|
|
@ -52,13 +52,7 @@ export function MessageItem({ message }: { message: Message }) {
|
|||
) : (
|
||||
<Box sx={{ position: "relative" }}>
|
||||
<Code block {...props} />
|
||||
<CopyButton
|
||||
value={
|
||||
typeof props.children === "string"
|
||||
? props.children
|
||||
: ""
|
||||
}
|
||||
>
|
||||
<CopyButton value={String(props.children)}>
|
||||
{({ copied, copy }) => (
|
||||
<Tooltip
|
||||
label={copied ? "Copied" : "Copy"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue