Skip to content

Commit

Permalink
πŸ™πŸ™
Browse files Browse the repository at this point in the history
  • Loading branch information
algarfer authored Mar 14, 2024
1 parent 2dba5f5 commit 3bac42a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webapp/src/views/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,18 @@ export default function Game() {

const timerId = useRef();

const navigate = useNavigate();

// Next question
const next = useCallback(() => {
const navigate = useNavigate();

if (current === questions.length - 1) {
navigate("/menu");
}

setCurrent(current + 1);
setTimeLeft(initialTime);
setProgressBarPercent(0);
}, [current, questions.length, initialTime]);
}, [current, questions.length, initialTime, navigate]);

// Timer
useEffect(() => {
Expand Down

0 comments on commit 3bac42a

Please sign in to comment.