Skip to content

Commit

Permalink
Remove extra copy button
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Proshin authored and Boris Proshin committed Jul 20, 2023
1 parent a18ad93 commit 3fcf06d
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/components/MessageItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ThemeIcon,
Tooltip,
} from "@mantine/core";
import { Prism } from '@mantine/prism'
import { Prism } from "@mantine/prism";
import { IconCopy, IconUser } from "@tabler/icons-react";
import { useMemo } from "react";
import ReactMarkdown from "react-markdown";
Expand Down Expand Up @@ -58,21 +58,6 @@ export function MessageItem({ message }: { message: Message }) {
language={language as any}
children={`${props.children as string}`}
/>
<CopyButton value={String(props.children)}>
{({ copied, copy }) => (
<Tooltip
label={copied ? "Copied" : "Copy"}
position="left"
>
<ActionIcon
sx={{ position: "absolute", top: 4, right: 4 }}
onClick={copy}
>
<IconCopy opacity={0.4} size={20} />
</ActionIcon>
</Tooltip>
)}
</CopyButton>
</Box>
);
},
Expand Down

0 comments on commit 3fcf06d

Please sign in to comment.