Skip to content

Commit

Permalink
fixed markdown rendering in report message (#611)
Browse files Browse the repository at this point in the history
* fix

* formatting fix

* fix

* Fiexed lint issues
  • Loading branch information
smritidoneria authored Nov 2, 2024
1 parent d21255c commit faf9fb7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/react/src/views/ReportMessage/MessageReportWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Box, Input } from '@embeddedchat/ui-elements';
import ReportWindowButtons from './ReportWindowButtons';
import { useMessageStore } from '../../store';
import styles from './ReportMessage.styles';

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

0 comments on commit faf9fb7

Please sign in to comment.