From cb53d747f4c8f74b080d086ffa0ff9c7018fc43a Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Thu, 25 Apr 2024 18:20:18 +0200 Subject: [PATCH] =?UTF-8?q?M=C3=A1s=20errores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gatewayservice/gateway-service.js | 4 ++-- webapp/src/components/CustomModal/CustomModal.js | 3 +-- webapp/src/components/Profile/Profile.js | 2 +- webapp/src/pages/Bateria/Bateria.js | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 581468c4..8c4e7143 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -28,7 +28,7 @@ app.get("/health", (req, res) => { res.json({ status: "OK" }); }); -var returnError = (res, error) => { +let returnError = (res, error) => { console.log(error); res.status(error.response.status).json({ error: error.response.data.error }); } @@ -246,7 +246,7 @@ app.get("/ranking", async (req, res) => { } }); -var openapiPath='./openapi.yaml' +let openapiPath='./openapi.yaml' if (fs.existsSync(openapiPath)) { const file = fs.readFileSync(openapiPath, 'utf8'); diff --git a/webapp/src/components/CustomModal/CustomModal.js b/webapp/src/components/CustomModal/CustomModal.js index bcf6c0ad..31f1706e 100644 --- a/webapp/src/components/CustomModal/CustomModal.js +++ b/webapp/src/components/CustomModal/CustomModal.js @@ -1,6 +1,5 @@ import React from 'react'; -import { Button, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter } from '@chakra-ui/react'; -import { useDisclosure } from '@chakra-ui/react'; +import { Button, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react'; import { useNavigate } from 'react-router-dom'; const CustomModal = ({ title, text, route }) => { diff --git a/webapp/src/components/Profile/Profile.js b/webapp/src/components/Profile/Profile.js index 6b6b24f8..c4816a6c 100644 --- a/webapp/src/components/Profile/Profile.js +++ b/webapp/src/components/Profile/Profile.js @@ -70,7 +70,7 @@ const Perfil = () => { {userData.games.slice(0, 10).map((game, index) => ( - + {game.gamemode} {game.gamemode === 'calculadora' ? '-' : game.correctAnswers} {game.gamemode === 'calculadora' ? '-' : game.incorrectAnswers} diff --git a/webapp/src/pages/Bateria/Bateria.js b/webapp/src/pages/Bateria/Bateria.js index e9c868a3..babd88ec 100644 --- a/webapp/src/pages/Bateria/Bateria.js +++ b/webapp/src/pages/Bateria/Bateria.js @@ -223,7 +223,6 @@ const JuegoPreguntas = () => { {preguntaActual.respuestas.map((respuesta, index) => (