diff --git a/web/components/chat/ChatUserMessage/ChatUserMessage.tsx b/web/components/chat/ChatUserMessage/ChatUserMessage.tsx index 30f812c75..4f42cb378 100644 --- a/web/components/chat/ChatUserMessage/ChatUserMessage.tsx +++ b/web/components/chat/ChatUserMessage/ChatUserMessage.tsx @@ -3,12 +3,11 @@ import { useEffect, useState } from 'react'; import { Highlight } from 'react-highlighter-ts'; import he from 'he'; import cn from 'classnames'; -import { Button, Dropdown, Menu } from 'antd'; -import { DeleteOutlined, EllipsisOutlined, StopOutlined } from '@ant-design/icons'; import s from './ChatUserMessage.module.scss'; import { formatTimestamp } from './messageFmt'; import { ChatMessage } from '../../../interfaces/chat-message.model'; import { ModIcon } from '../../ui'; +import ChatModerationActionMenu from '../ChatModerationActionMenu/ChatModerationActionMenu'; interface Props { message: ChatMessage; @@ -27,8 +26,8 @@ export default function ChatUserMessage({ sameUserAsLast, isAuthorModerator, }: Props) { - const { body, user, timestamp } = message; - const { displayName, displayColor } = user; + const { id: messageId, body, user, timestamp } = message; + const { id: userId, displayName, displayColor } = user; const color = `var(--theme-user-colors-${displayColor})`; const formattedTimestamp = `Sent at ${formatTimestamp(timestamp)}`; @@ -56,46 +55,19 @@ export default function ChatUserMessage({
{formattedMessage}
- {showModeratorMenu && } + {showModeratorMenu && ( +
+ +
+ )}
); } - -function ModeratorMenu() { - const menu = ( - - - Hide message - - ), - key: 0, - }, - - { - label: ( -
- - Ban User -
- ), - key: 1, - }, - ]} - /> - ); - - return ( -
- -
- ); -}