From cfd29cd7becf52e8f98f9f11d84e0616c786f39f Mon Sep 17 00:00:00 2001 From: uo264915 Date: Mon, 8 Apr 2024 00:32:26 +0200 Subject: [PATCH] Arreglos de warnings --- package-lock.json | 2 +- webapp/src/components/Game.js | 9 ++++++--- webapp/src/components/MainPage.js | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b9c122e..e12e1c11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "WIQ_ES2B", + "name": "wiq_es2b", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/webapp/src/components/Game.js b/webapp/src/components/Game.js index d48854c7..8c44e537 100644 --- a/webapp/src/components/Game.js +++ b/webapp/src/components/Game.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import axios from 'axios'; import { Container, Typography, Button, Paper} from '@mui/material'; -import { useNavigate, useParams } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; import './Game.css'; @@ -83,6 +83,7 @@ const Game = () => { useEffect(() => { handleShowQuestion(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -99,14 +100,16 @@ const Game = () => { if (isGameFinished() && !isFinished){ finishGame(); setFinished(true); -; } + } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [correctCounter]); useEffect(() => { if (isGameFinished() && !isFinished){ finishGame(); setFinished(true); -; } + } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [incorrectCounter]); // This method will call the create question service diff --git a/webapp/src/components/MainPage.js b/webapp/src/components/MainPage.js index 9bba6333..757bf60a 100644 --- a/webapp/src/components/MainPage.js +++ b/webapp/src/components/MainPage.js @@ -1,6 +1,6 @@ -import React, { useState } from 'react'; -import { Container, Typography, TextField, Button, Snackbar } from '@mui/material'; -import { useNavigate, useParams } from 'react-router-dom'; +import React, { } from 'react'; +import { Container, Typography, Button } from '@mui/material'; +import { useNavigate } from 'react-router-dom'; import './MainPage.css'; const MainPage = () => {