Skip to content

Commit

Permalink
Merge pull request #63 from Arquisoft/tests-e2e
Browse files Browse the repository at this point in the history
arreglados errores compilacion
  • Loading branch information
uo283182 authored Apr 27, 2024
2 parents b67b2b6 + 4e43a7f commit c360a5b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion webapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import AddUser from './components/AddUser';
import Login from './components/Login';
import Container from '@mui/material/Container';
import { BrowserRouter as Router, Route, Routes, Link, Navigate } from 'react-router-dom';
// eslint-disable-next-line
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import HomeScreen from './components/HomeScreen';
import Game from './components/Game';
import Welcome from './components/Welcome';
Expand Down
10 changes: 6 additions & 4 deletions webapp/src/components/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const Game = ({ esperaFinalizacion = 3000 }) => {
if (contadorGlobal === 0) {
checkPregunta();
}
// eslint-disable-next-line
}, [contadorGlobal]);

/**
Expand Down Expand Up @@ -90,7 +91,7 @@ const Game = ({ esperaFinalizacion = 3000 }) => {
inputs.forEach(input => {
input.disabled = true;
});
if(numPreguntas==numQuestions){
if(numPreguntas===numQuestions){
setTimeout(addPregunta, esperaFinalizacion); //esperar un poco para que se vean los resultados de la ultima pregunta
}
else {
Expand All @@ -104,7 +105,7 @@ const Game = ({ esperaFinalizacion = 3000 }) => {
* También se asegura de poner los inputs de la respuesta sin active, además de volverlos a habilitar
*/
const addPregunta = async () => {
if(numPreguntas==numQuestions){
if(numPreguntas===numQuestions){
calculateTime();
setFinished(true);
} else {
Expand Down Expand Up @@ -136,13 +137,13 @@ const Game = ({ esperaFinalizacion = 3000 }) => {
respCopia[random] = { data: response.data.correcta, isCorrect: true };
let cont = 0;
for (let i = 0; i < respuestas.length; i++) {
if (i != random) {
if (i !== random) {
respCopia[i] = { data: response.data.incorrectas[cont], isCorrect: false };
cont++;
}
}
setRespuestas(respCopia);
if (numPreguntas==0) {
if (numPreguntas===0) {
startTime(); //inicio el tiempo una vez se vea la primera pregunta
}
// Reiniciar el contador a 30
Expand Down Expand Up @@ -210,6 +211,7 @@ const Game = ({ esperaFinalizacion = 3000 }) => {

useEffect(() => {
checkUserLogin();
// eslint-disable-next-line
}, [])

return (
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const History = () => {

useEffect(() => {
checkUserLogin();
// eslint-disable-next-line
}, [])


Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ useEffect(() => {
if (logoutButton) {
logoutButton.style.display = 'inline-block';
}
// eslint-disable-next-line
}, [])


Expand Down

0 comments on commit c360a5b

Please sign in to comment.