Fix mod menu showing. Closes #1990

This commit is contained in:
Gabe Kangas
2022-08-10 21:41:56 -07:00
parent cf03a37aed
commit a7bbb06ea5
4 changed files with 7 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ interface Props {
highlightString: string;
sentBySelf: boolean;
sameUserAsLast: boolean;
isAuthorModerator: boolean;
}
export default function ChatUserMessage({
@@ -24,6 +25,7 @@ export default function ChatUserMessage({
showModeratorMenu,
sentBySelf, // Move the border to the right and render a background
sameUserAsLast,
isAuthorModerator,
}: Props) {
const { body, user, timestamp } = message;
const { displayName, displayColor } = user;
@@ -47,8 +49,8 @@ export default function ChatUserMessage({
>
{!sameUserAsLast && (
<div className={s.user} style={{ color }}>
{showModeratorMenu && <ModIcon />}
<span className={s.userName}>{displayName}</span>
{isAuthorModerator && <ModIcon />}
</div>
)}
<Highlight search={highlightString}>