Skip to content

Commit

Permalink
fix: correctly answered questions not being passed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgancfer committed Apr 21, 2024
1 parent 773decb commit b4f026c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/src/pages/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export default function Game() {

const nextRound = useCallback(async () => {
if (roundNumber + 1 > maxRoundNumber) {
await getGameDetails(gameId);
navigate("/dashboard/game/results", { state: { correctAnswers: correctAnswers } });
let gameDetails = (await getGameDetails(gameId)).data;
navigate("/dashboard/game/results", { state: { correctAnswers: gameDetails.correctly_answered_questions } });
} else {
setAnswer({});
setHasImage(false);
Expand Down

0 comments on commit b4f026c

Please sign in to comment.