Skip to content

Commit

Permalink
fix: call startRound on answering question
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgancfer committed Apr 21, 2024
1 parent 36325e1 commit 11da990
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webapp/src/pages/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function Game() {
if (result.status === HttpStatusCode.Ok) {
setQuestion(result.data);
setTimeElapsed(0);
setHasAnswered(false)
if (result.data.image) {
setHasImage(true);
}
Expand All @@ -64,6 +65,7 @@ export default function Game() {
const answerButtonClick = async (optionIndex, answer) => {
const selectedOptionIndex = selectedOption === optionIndex ? null : optionIndex;
setSelectedOption(selectedOptionIndex);
setHasAnswered(true);
setAnswer(answer);
const anyOptionSelected = selectedOptionIndex !== null;
setNextDisabled(!anyOptionSelected);
Expand Down

0 comments on commit 11da990

Please sign in to comment.