Fixed sentence header mapping

This commit is contained in:
Joao Ramos
2024-07-17 23:00:16 +01:00
parent 15f9fb320d
commit 4996417218

View File

@@ -39,17 +39,14 @@ const MatchSentencesEdit = (props: Props) => {
label={`Sentence ${index + 1}`}
name="sentence"
required
value={sentence.sentence.heading}
value={sentence.sentence}
onChange={(value) =>
updateExercise({
sentences: exercise.sentences.map((iSol) =>
iSol.id === sentence.id
? {
...iSol,
sentence: {
...iSol.sentence,
heading: value,
},
sentence: value,
}
: iSol
),