AxL95 commited on
Commit
fb65623
·
verified ·
1 Parent(s): c2c3530

Update frontend/src/components/ChatInterface.jsx

Browse files
frontend/src/components/ChatInterface.jsx CHANGED
@@ -173,17 +173,17 @@ const isMarkdown = (text) => {
173
  <h2 className="chat-title">Medic.ial</h2>
174
  </div>
175
  <div className="messages-container">
176
- {messages.map((msg, index) => {
177
- if (msg.sender === 'bot-streaming') return null;
178
-
179
- return (
180
- <div key={index} className={`message ${msg.sender}`}>
181
- <div className="message-content">
182
- {isMarkdown(msg.text) ? <ReactMarkdown>{msg.text}</ReactMarkdown> : msg.text}
183
- </div>
184
  </div>
185
- );
186
- })}
 
187
  {isStreaming && (
188
  <div className="message bot">
189
  <div className="message-content streaming-message">
 
173
  <h2 className="chat-title">Medic.ial</h2>
174
  </div>
175
  <div className="messages-container">
176
+ {messages.map((msg, index) => {
177
+ if (msg.sender === 'bot-streaming') return null;
178
+
179
+ return (
180
+ <div key={index} className={`message ${msg.sender}`}>
181
+ <div className="message-content">
182
+ <ReactMarkdown>{msg.text}</ReactMarkdown>
 
183
  </div>
184
+ </div>
185
+ );
186
+ })}
187
  {isStreaming && (
188
  <div className="message bot">
189
  <div className="message-content streaming-message">