From f25b65b73d2e6eb81d1b62a60744ff57da0646a2 Mon Sep 17 00:00:00 2001 From: Liliana Date: Fri, 26 Apr 2024 11:22:26 +0200 Subject: [PATCH] unnecesary code --- webapp/src/components/game/GameConfiguration.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/webapp/src/components/game/GameConfiguration.js b/webapp/src/components/game/GameConfiguration.js index 157c1795..f764927d 100644 --- a/webapp/src/components/game/GameConfiguration.js +++ b/webapp/src/components/game/GameConfiguration.js @@ -65,16 +65,9 @@ const GameConfiguration = () => { } } - // const handleChange = (event) => { - // setNumeroErrores(event.target.value); - // }; - const initiateGame = async () => { - console.log(tematicasSeleccionadas) - console.log(numPreguntas) await generateGameId(); - await getQuestions() - console.log(questions) + await getQuestions(); //isApiCalledRef = true//ASK - is this necessary? // navigation("/firstGame", {state: {questions, gameId}}) } @@ -82,7 +75,6 @@ const GameConfiguration = () => { const generateGameId = async () => { try { const response = await axios.get(`${apiEndpoint}/generateGame`) - console.log(response.data) gameId = response.data } catch(error) { console.error(error); @@ -102,9 +94,7 @@ const GameConfiguration = () => { const getQuestions = async () => { try { const topicsFormated = formatearTopics() - console.log(topicsFormated) const response = await axios.get(`${apiEndpoint}/questions?n_preguntas=${numPreguntas}&n_respuestas=${numRes}${topicsFormated}`); - console.log(response.data.length) for (var i = 0; i < response.data.length; i++) { var possibleAnswers = [response.data[i].respuesta_correcta] for (var j = 0; j < response.data[i].respuestas_incorrectas.length; j++) {