Open tangway opened 4 months ago
added disabled={(numberOfAttempts === 4 || correct) ? true : false} to the button attribute for when attempts are finished or when answer is correct
disabled={(numberOfAttempts === 4 || correct) ? true : false}
added this to the checkAnswer function to disable the button which user clicked so it can't be selected again
checkAnswer
const target = event.currentTarget; target.disabled = true;
added
disabled={(numberOfAttempts === 4 || correct) ? true : false}
to the button attribute for when attempts are finished or when answer is correct