mirror of
https://github.com/owncast/owncast.git
synced 2024-11-23 13:24:33 +03:00
22 lines
548 B
TypeScript
22 lines
548 B
TypeScript
import { ChatMessage } from '../../interfaces/chat-message.model';
|
|
|
|
interface Props {
|
|
message: ChatMessage;
|
|
showModeratorMenu: boolean;
|
|
}
|
|
|
|
export default function ChatUserMessage(props: Props) {
|
|
const { message, showModeratorMenu } = props;
|
|
const { body, user, timestamp } = message;
|
|
const { displayName, displayColor } = user;
|
|
|
|
// TODO: Convert displayColor (a hue) to a usable color.
|
|
|
|
return (
|
|
<div>
|
|
<div>{displayName}</div>
|
|
<div>{body}</div>
|
|
{showModeratorMenu && <div>Moderator menu</div>}
|
|
</div>
|
|
);
|
|
}
|