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.
This commit is contained in:
2026-10-22 12:33:48 +01:00
parent 08d02e6033
commit 133e6b87c9
5 changed files with 72 additions and 11 deletions
@@ -0,0 +1,15 @@
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} />;
}