Skip to content

Commit

Permalink
✨ Cambios finales - arreglado problema e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coral2742 committed May 7, 2024
1 parent 6fce1ad commit cc371fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import './Footer.css'; // Importa el archivo de estilos CSS
import { AppBar, Toolbar, Typography } from '@mui/material';
import { Toolbar } from '@mui/material';

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

const [openDialog, setOpenDialog] = useState(false);

const [gameData, setGameData] = useState(null); // Variable local para almacenar los datos de la partida


const handleDialogOpen = () => {
setIsTimerActive(false);
setOpenDialog(true);
Expand Down Expand Up @@ -311,9 +308,7 @@ const getQuestions = () => {
totalQuestions: numberOfQuestions,
correctAnswers: correctCounter,
incorrectAnswers: numberOfQuestions-correctCounter
};
setGameData(newGame);

};

axios.post(`${apiEndpoint}/addgame`, newGame)
.then(response => {
Expand Down
8 changes: 7 additions & 1 deletion webapp/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ const Login = () => {
</Button>
<Snackbar open={openSnackbar} autoHideDuration={6000} onClose={() => {setOpenSnackbar(false);}} message="Inicio de sesión exitoso" />
{error && (
<Snackbar open={!!error} autoHideDuration={6000} onClose={() => {{setOpenSnackbar(true);setError('Error: Credenciales inválidas');}}} message={error} />
<Snackbar
open={!!error}
autoHideDuration={6000}
onClose={() => { setOpenSnackbar(true); setError('Error: Credenciales inválidas'); }}
message={error}
/>
)}

</div>
</Container>
);
Expand Down

0 comments on commit cc371fd

Please sign in to comment.