diff --git a/webapp/src/components/Game.js b/webapp/src/components/Game.js index 8c44e537..804cd95d 100644 --- a/webapp/src/components/Game.js +++ b/webapp/src/components/Game.js @@ -56,6 +56,11 @@ const Game = () => { } else { // Se acabó el tiempo setTimedOut(true); + const buttons = document.querySelectorAll('button[title="btnsPreg"]'); + buttons.forEach(button => { + button.disabled = true; + button.onmouse = null; + }); } }); } @@ -151,7 +156,8 @@ const Game = () => { const handleAnswerClick = (option, index) => { // Almacenar la opción seleccionada por el usuario en gameUserOptions setGameUserOptions(prevUserOptions => [...prevUserOptions, option]); - + // parar el temporizador + stopTimer(); if(option === correctOption) { const buttonId = `button_${index}`; const correctButton = document.getElementById(buttonId); @@ -164,9 +170,6 @@ const Game = () => { const incorrectButton = document.getElementById(buttonId); incorrectButton.style.backgroundColor = "rgba(208, 22, 22, 0.952)"; - // parar el temporizador - stopTimer(); - // mostrar la correcta for (let correctIndex = 0; correctIndex < 4; correctIndex++){ const buttonIdCorrect = `button_${correctIndex}`; @@ -332,9 +335,17 @@ const getQuestions = () => {