Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed markdown rendering in report message #611

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/react/src/views/ReportMessage/MessageReportWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { Box, Input } from '@embeddedchat/ui-elements';
import ReportWindowButtons from './ReportWindowButtons';
import { useMessageStore } from '../../store';
import styles from './ReportMessage.styles';
import { Markdown } from '../Markdown'

const MessageReportWindow = ({ messageId }) => {
const [reportDescription, setDescription] = useState('');
const messages = useMessageStore((state) => state.messages);
const messageText = messages.filter((message) => message._id === messageId)[0]
?.msg;
const message = messages.filter((message) => message._id === messageId)[0];
return (
<ReportWindowButtons
variant="danger"
Expand All @@ -19,7 +19,7 @@ const MessageReportWindow = ({ messageId }) => {
reportDescription={reportDescription}
messageId={messageId}
>
<Box>{JSON.stringify(messageText)}</Box>
<Box><Markdown body={message} isReaction={false}/></Box>
<Box css={styles.conatiner}>
<Input
textArea
Expand Down
Loading