Files
cobble/src/pages/admin/bots/[bot_id]/(partials)/user-message-copy.tsx
T
tben 133e6b87c9 Put a user message's copy button beside its timestamp
The copy button sat on its own row above the group's time, costing a
line of vertical space for nothing. It now shares that row, left of the
timestamp, the way a bot message's actions already do. A file-only
message leaves no gap: only messages with text get a button, picked by
copyableMessages.
2026-10-22 12:33:48 +01:00

16 lines
376 B
TypeScript

import CopyMessageButton from "./copy-message-button";
type Props = {
text: string;
};
/**
* One message's copy button, in the row under a user group beside its
* timestamp. A message with no text renders nothing at all.
*/
export default function UserMessageCopy({ text }: Props) {
if (!text.trim()) return null;
return <CopyMessageButton text={text} />;
}