Solved a quick bug

This commit is contained in:
Tiago Ribeiro
2024-01-26 11:41:31 +00:00
parent 9b87764afb
commit 3eafc799ab
3 changed files with 14 additions and 26 deletions

View File

@@ -132,7 +132,14 @@ export default function Writing({
<Button
color="purple"
disabled={!isSubmitEnabled}
onClick={() => onNext({exercise: id, solutions: [{id, solution: inputText}], score: {correct: 1, total: 1, missing: 0}, type})}
onClick={() =>
onNext({
exercise: id,
solutions: [{id, solution: inputText.replaceAll(/\s{2,}/g, " ")}],
score: {correct: 1, total: 1, missing: 0},
type,
})
}
className="max-w-[200px] self-end w-full">
Next
</Button>