|
|
@@ -5,10 +5,7 @@ import { queryMessageList, sendMessage } from '@/services/staff'
|
|
|
import AddMessage from './components/AddMessage'
|
|
|
import consts from '@/consts'
|
|
|
import { useRequest } from 'umi'
|
|
|
-import MarkdownIt from 'markdown-it'
|
|
|
-// import useWebSocketFn, { cmdType } from '@/hooks/core/useWebSocketFn'
|
|
|
-
|
|
|
-const mdParser = new MarkdownIt()
|
|
|
+import MarkDown from 'react-markdown'
|
|
|
|
|
|
const Notification = () => {
|
|
|
const tRef = useRef(null)
|
|
|
@@ -92,7 +89,7 @@ const Notification = () => {
|
|
|
</div>
|
|
|
}
|
|
|
/>
|
|
|
- {mdParser.render(item.content)}
|
|
|
+ <MarkDown>{item.content}</MarkDown>
|
|
|
<div className="mt-1 text-hex-aaa">{item.createTime}</div>
|
|
|
</List.Item>
|
|
|
)}
|