From 2427b458dc3b43da4d42505c21f0183fd5d388cc Mon Sep 17 00:00:00 2001
From: jisangs
Date: Tue, 26 May 2026 18:25:57 +0900
Subject: [PATCH] =?UTF-8?q?=EA=B2=B0=EA=B3=BC=EC=B0=BD=EC=97=90=20?=
=?UTF-8?q?=EC=A0=95=EB=8B=B5,=20=EC=98=A4=EB=8B=B5=20=EB=82=B4=EC=9A=A9?=
=?UTF-8?q?=20=EC=B6=9C=EB=A0=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/(game)/play/PlayClient.tsx | 2 +
components/game/AnswerResultLine.tsx | 64 ++++++++++++++++++++++++++++
components/game/FeedbackPanel.tsx | 50 +++-------------------
components/game/ScoreSummary.tsx | 50 ++++++++++++++++++++++
4 files changed, 123 insertions(+), 43 deletions(-)
create mode 100644 components/game/AnswerResultLine.tsx
diff --git a/app/(game)/play/PlayClient.tsx b/app/(game)/play/PlayClient.tsx
index e660acf..7af82aa 100644
--- a/app/(game)/play/PlayClient.tsx
+++ b/app/(game)/play/PlayClient.tsx
@@ -221,6 +221,8 @@ export default function PlayClient({ problemCount }: PlayClientProps) {
);
diff --git a/components/game/AnswerResultLine.tsx b/components/game/AnswerResultLine.tsx
new file mode 100644
index 0000000..8e39e7f
--- /dev/null
+++ b/components/game/AnswerResultLine.tsx
@@ -0,0 +1,64 @@
+"use client";
+
+import type { ReactNode } from "react";
+
+import KatexRenderer from "@/components/math/KatexRenderer";
+
+interface AnswerResultLineProps {
+ expressionLatex: string;
+ userAnswerLatex: string;
+ correctAnswerLatex: string;
+ correct: boolean;
+ prefix?: ReactNode;
+}
+
+export default function AnswerResultLine({
+ expressionLatex,
+ userAnswerLatex,
+ correctAnswerLatex,
+ correct,
+ prefix,
+}: AnswerResultLineProps) {
+ return (
+
+ {prefix}
+
+ =
+
+
+
+ {correct ? (
+
+ ○
+
+ ) : (
+ <>
+
+ ×
+
+
+ (
+
+
+
+ )
+
+ >
+ )}
+
+ );
+}
diff --git a/components/game/FeedbackPanel.tsx b/components/game/FeedbackPanel.tsx
index 63e2186..43578b6 100644
--- a/components/game/FeedbackPanel.tsx
+++ b/components/game/FeedbackPanel.tsx
@@ -2,7 +2,7 @@
import { useEffect, useRef } from "react";
-import KatexRenderer from "@/components/math/KatexRenderer";
+import AnswerResultLine from "@/components/game/AnswerResultLine";
import type { GradeResult, ParenthesisSignProblem } from "@/lib/engine/types";
interface FeedbackPanelProps {
@@ -53,49 +53,13 @@ export default function FeedbackPanel({
{feedbackItems.map((item, index) => (
- -
-
- =
-
-
-
- {item.correct ? (
-
- ○
-
- ) : (
- <>
-
- ×
-
-
- (
-
-
-
- )
-
- >
- )}
-
+ expressionLatex={item.formulaLatex}
+ userAnswerLatex={`${item.userAnswer}`}
+ correctAnswerLatex={`${item.correctAnswer}`}
+ correct={item.correct}
+ />
))}