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:
@@ -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} />;
|
||||
}
|
||||
Reference in New Issue
Block a user