Skip to content

Commit

Permalink
quitando tiempo de estadisticas
Browse files Browse the repository at this point in the history
  • Loading branch information
uo276026 committed Apr 28, 2024
1 parent 5bd50ae commit d691733
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion webapp/e2e/steps/home.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defineFeature(feature, test => {
then('I should be able to interact with the app', async () => {
await expect(page).toMatchElement("button", { text: "JUGAR" });
await expect(page).toMatchElement("button", { text: "ESTADÍSTICAS" });
});
});
})

afterAll(async ()=>{
Expand Down
8 changes: 2 additions & 6 deletions webapp/src/components/Pages/Estadisticas.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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 [averageTime, setAverageTime] = useState(0);
const [firstRender, setFirstRender] = useState(false);

useEffect(() => {
Expand All @@ -30,7 +30,7 @@ const Estadisticas = ({isLogged, username}) => {
setCorrectAnswers(datos.user.correctAnswers);
setIncorrectAnswers(datos.user.incorrectAnswers);
setCompletedGames(datos.user.completedGames);
setAverageTime(datos.user.averageTime);
//setAverageTime(datos.user.averageTime);
} catch (error) {
setError('Error al cargar la información');
}
Expand All @@ -54,10 +54,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

0 comments on commit d691733

Please sign in to comment.