Skip to content

Commit

Permalink
fix(front): Rendering AI messages correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Jul 14, 2024
1 parent ff5aef8 commit 9dedc55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export default function App() {
<div className="d-flex flex-row justify-content-end mb-4 pt-1" key={messageGroup.id}>
<div>
{messageGroup.messages.map((message) => (
<p className="small p-2 me-3 mb-1 text-white rounded-3 bg-primary" key={message.id}>
<p
className="small p-2 me-3 mb-1 text-white rounded-3 bg-primary"
key={message.id}
style={{ whiteSpace: "pre-line" }}
>
{message.content}
</p>
))}
Expand All @@ -106,7 +110,7 @@ export default function App() {
{messageGroup.messages.map((message) => (
<p
className="small p-2 ms-3 mb-1 rounded-3"
style={{ backgroundColor: "#f5f6f7" }}
style={{ backgroundColor: "#f5f6f7", whiteSpace: "pre-line" }}
key={message.id}
>
{message.content}
Expand Down

0 comments on commit 9dedc55

Please sign in to comment.