Skip to content

Commit

Permalink
Pequeño error con el guardado de partida
Browse files Browse the repository at this point in the history
  • Loading branch information
CANCI0 committed Apr 7, 2024
1 parent 3d4af0e commit c32da47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webapp/src/pages/Bateria/Bateria.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ const JuegoPreguntas = () => {
useEffect(() => {
fetchQuestions();
handleTimer();
// eslint-disable-next-line
}, []);

useEffect(() => {
if (juegoTerminado && tiempoMedio !== 0) {
guardarPartida();
}
// eslint-disable-next-line
}, [juegoTerminado, tiempoMedio]);

useEffect(() => {
if (tiempoRestante === 0) {
setJuegoTerminado(true);
Expand All @@ -41,6 +49,7 @@ const JuegoPreguntas = () => {
setTiempoMedio(tMedio);
}
}
// eslint-disable-next-line
}, [tiempoRestante]);

const fetchQuestions = () => {
Expand Down

0 comments on commit c32da47

Please sign in to comment.