Skip to content

Commit 21a0bbb

Browse files
authored
Merge pull request #100 from boostcampwm-2024/feat-fe-#98
RAG 답안 react-markdown 적용
2 parents 3ecd8ae + 1a48d49 commit 21a0bbb

File tree

3 files changed

+557
-31
lines changed

3 files changed

+557
-31
lines changed

apps/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"postcss": "^8.4.47",
4545
"react": "^18.3.1",
4646
"react-dom": "^18.3.1",
47+
"react-markdown": "^9.0.3",
4748
"tailwind-merge": "^2.5.4",
4849
"tailwindcss": "^3.4.14",
4950
"tailwindcss-animate": "^1.0.7",

apps/frontend/src/features/AI/ui/QnA/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import ReactMarkdown from "react-markdown";
2+
13
interface QnAType {
24
question: string;
35
answer: string;
@@ -9,7 +11,9 @@ export function QnA({ question, answer }: QnAType) {
911
<div className="mb-1 w-full rounded-md border-[1px] border-[#d0d9e0] bg-[#f5f6fa] px-3 py-2 font-bold">
1012
{question}
1113
</div>
12-
<div className="min-h-[100px] p-2 font-light">{answer}</div>
14+
<div className="min-h-[100px] p-2">
15+
<ReactMarkdown>{answer}</ReactMarkdown>
16+
</div>
1317
</div>
1418
);
1519
}

0 commit comments

Comments
 (0)