괄호 안의 항을 2, 3, 4 항으로 설정하는 기능 추가

This commit is contained in:
2026-05-31 13:40:45 +09:00
parent e148a957ea
commit ac3c939051
21 changed files with 708 additions and 344 deletions
+5 -4
View File
@@ -23,10 +23,11 @@ export default function FeedbackPanel({
onNext,
}: FeedbackPanelProps) {
const nextButtonRef = useRef<HTMLButtonElement>(null);
const signedTerms = [
problem.a,
problem.operator === "-" ? -problem.b : problem.b,
] as const;
const signedTerms = problem.terms.map((term, index) => {
if (index === 0) return term;
return problem.operators[index - 1] === "-" ? -term : term;
});
const feedbackItems = signedTerms.map((term, index) => ({
formulaLatex: `${formatSignedNumber(
problem.multiplier,