import type { IMessage, MessageQuoteAttachment } from '@rocket.chat/core-typings'; import { css } from '@rocket.chat/css-in-js'; import { IconButton, Box, Margins } from '@rocket.chat/fuselage'; import { useUserDisplayName } from '@rocket.chat/ui-client'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { QuoteAttachment } from '../../../../components/message/content/attachments/QuoteAttachment'; import AttachmentProvider from '../../../../providers/AttachmentProvider'; import { useChat } from '../../contexts/ChatContext'; export type MessageBoxReplyProps = { reply: IMessage }; const MessageBoxReply = ({ reply }: MessageBoxReplyProps) => { const { t } = useTranslation(); const chat = useChat(); const displayName = useUserDisplayName(reply?.u); const closeWrapperStyle = css` position: absolute; right: 0.5rem; top: 0.75rem; `; return ( ({ ...obj, collapsed: true })), collapsed: true, } as MessageQuoteAttachment } /> { chat?.composer?.dismissQuotedMessage(reply._id); }} > ); }; export default memo(MessageBoxReply);