(null);
+ const signedTerms = [
+ problem.a,
+ problem.operator === "-" ? -problem.b : problem.b,
+ ] as const;
+ const feedbackItems = signedTerms.map((term, index) => ({
+ formulaLatex: `${formatSignedNumber(
+ problem.multiplier,
+ )}\\times ${formatSignedNumber(term)}`,
+ userAnswer: result.userAnswer[index],
+ correctAnswer: result.correctAnswer[index],
+ correct: result.userAnswer[index] === result.correctAnswer[index],
+ }));
useEffect(() => {
nextButtonRef.current?.focus();
@@ -35,9 +51,53 @@ export default function FeedbackPanel({
{result.correct ? "정답입니다." : "오답입니다."}
-
-
-
+
+ {feedbackItems.map((item, index) => (
+ -
+
+ =
+
+
+
+ {item.correct ? (
+
+ ○
+
+ ) : (
+ <>
+
+ ×
+
+
+ (
+
+
+
+ )
+
+ >
+ )}
+
+ ))}
+