Skip to content

Commit

Permalink
Quitando de estadisticas el tiempo medio
Browse files Browse the repository at this point in the history
  • Loading branch information
uo276026 committed Apr 30, 2024
1 parent bdb37d4 commit eca042a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions webapp/src/components/Pages/Estadisticas.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const Estadisticas = ({isLogged, username}) => {
const [correctAnswers, setCorrectAnswers] = useState(0);
const [incorrectAnswers, setIncorrectAnswers] = useState(0);
const [completedGames, setCompletedGames] = useState(0);
const [averageTime, setAverageTime] = useState(0);
const [firstRender, setFirstRender] = useState(false);

useEffect(() => {
Expand All @@ -30,7 +29,6 @@ const Estadisticas = ({isLogged, username}) => {
setCorrectAnswers(datos.user.correctAnswers);
setIncorrectAnswers(datos.user.incorrectAnswers);
setCompletedGames(datos.user.completedGames);
setAverageTime(datos.user.averageTime);
} catch (error) {
setError('Error al cargar la información');
}
Expand All @@ -54,10 +52,6 @@ const Estadisticas = ({isLogged, username}) => {
<td>Nº Juegos completados: </td>
<td> {completedGames} </td>
</tr>
<tr>
<td>Tiempo medio por juego: </td>
<td> {averageTime} </td>
</tr>
</tbody>
</table>

Expand Down
2 changes: 0 additions & 2 deletions webapp/src/components/tests/Estadisticas.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ describe('Estadisticas Component', () => {
expect(getByText('Nº Juegos completados:')).toBeInTheDocument();
expect(getByText('20')).toBeInTheDocument(); // Verifica que el número de juegos completados sea 20

expect(getByText('Tiempo medio por juego:')).toBeInTheDocument();
expect(getByText('30')).toBeInTheDocument(); // Verifica que el tiempo medio por juego sea 30
});
});

Expand Down

0 comments on commit eca042a

Please sign in to comment.