const GetHeaderWallpaper = async()=>{
try{
const {data} = await axios.get(/trending/all/day
);
let randomdata = data.results[(Math.random()*data.results.length).toFixed()];
setwallpaper(randomdata);
console.log({randomdata});
}
catch(error){
console.log("Error:",error);
}
};
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de ticao2 🇧🇷 pt-BR
le 28 octobre 2024 à 18h54
This code of yours builds an API Request.
Using the AXIOS tool.
What we need to know is which API Request is sent to our server.
Can you tell us what it is here?
Problems with API Request
In order for someone to help you with API Request questions,
it is critical that you post here the API Request you are sending to the TMDb server.
Remember to replace your Key with MY_KEY , YOUR_KEY , THE_KEY , or something like that.
Not the programming code/script you used to build the API Request.
But the API Request that is sent to the TMDb server.
Or the API Request you would like to send.
Réponse de ticao2 🇧🇷 pt-BR
le 28 octobre 2024 à 19h54
As it is probably an issue with AXIOS perhaps some of the conversations below will help.
Axios Issues
https://www.themoviedb.org/talk/63e3d510db154f00812e67c6
https://www.themoviedb.org/talk/6037bbc2afa1b00043a76e2c
https://www.themoviedb.org/talk/5f621eae93388b003864513c
https://www.themoviedb.org/talk/5f55e3dd713ed40037f090d4
https://www.themoviedb.org/talk/5d5901d21749730017dd837a
https://www.themoviedb.org/talk/5bab86480e0a2664d4022f98