No need to press enter twice for multiple answers

This commit is contained in:
2021-09-30 11:51:36 +01:00
parent cef337e5f5
commit 33cacf597a

View File

@@ -322,6 +322,9 @@ export default withRouter(class Progress extends React.Component {
// store correct answer
newState.incorrectAnswers = this.state.incorrectAnswers;
newState.incorrectAnswers[data.currentVocabId].answer = data.correctAnswers;
} else if (data.correct && data.moreAnswers) {
newState.answerInput = "";
newState.currentAnswerStatus = null;
} else if (!data.correct) {
// incorrect answer given
// store prompt and count=0