error
; - - const createGame = async () => { - - const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; - - try { - setPlayers([ - { - username: username, - points: 0, - isBot: false, - } - ]) - const requestData = { - players: [{ - uuid: uuid, - }], - }; - - const response = await axios.post(`${apiEndpoint}/createGame`, requestData); - - const createdGame = response.data; - - setQuestions(createdGame); - console.log('Juego creado:', createdGame); - - - setCurrentStage(1); - return createdGame; - } catch (error) { - console.error('Error al crear el juego:', error); - throw error; - } - }; - - const handlePlayers = (Players:Player[]) => { - return setPlayers(Players); - } - - const handleCurrentStage = (n:number) => { - return setCurrentStage(n); - } - - - return ( -Error
; + + const handlePlayers = (Players:Player[]) => { + setPlayers(Players); + }; + + const handleCurrentStage = (n:number) => { + setCurrentStage(n); + }; + + return ( +