diff --git a/components/answered-card.tsx b/components/answered-card.tsx index cae329d..d444290 100644 --- a/components/answered-card.tsx +++ b/components/answered-card.tsx @@ -41,9 +41,9 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) { {answer.questionText} - {answer.options && answer.options.length > 0 && ( + {((answer.options?.length ?? 0) > 0 || answer.other) && (
- {answer.options.map((opt) => { + {answer.options?.map((opt) => { const sel = selectedIdx.has(opt.index); const key = isQuiz && correctIdx.has(opt.index); return ( @@ -70,10 +70,20 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) {
); })} + {/* The learner's own typed option is an OPTION — same container, + same selected styling as its siblings, not a loose quote + floating outside the list. Quotes keep the learner's words. */} + {answer.other && ( +
+ “{answer.other}” +
+ )} )} - {answer.other &&
“{answer.other}”
} {answer.text &&
“{answer.text}”
} {answer.dontKnow && isQuiz &&
Answered “I don't know”.
} diff --git a/components/question-dock.tsx b/components/question-dock.tsx index c084fd5..f758d32 100644 --- a/components/question-dock.tsx +++ b/components/question-dock.tsx @@ -412,6 +412,14 @@ function QuestionDockForm({