refactor(markdown): changed markdown conf loc
This commit is contained in:
parent
6fd667edb2
commit
607b25aa62
2 changed files with 64 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import React, { useRef, useEffect } from "react";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import { MARKDOWN_COMPONENTS } from "src/config/markdown";
|
||||
|
||||
function MessageBubble({ message }) {
|
||||
const isUser = message.role === "user";
|
||||
|
|
@ -11,7 +12,9 @@ function MessageBubble({ message }) {
|
|||
{isUser ? (
|
||||
<div className="text-sm">{message.content}</div>
|
||||
) : (
|
||||
<ReactMarkdown>{message.content}</ReactMarkdown>
|
||||
<ReactMarkdown components={MARKDOWN_COMPONENTS}>
|
||||
{message.content}
|
||||
</ReactMarkdown>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue