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);
}
};
Nemôžeš nájsť film alebo seriál? Prihlás sa a pridaj ho.
Chcete ohodnotiť alebo pridať túto položku do zoznamu?
Nie ste členom?
Odpoveď od ticao2 🇧🇷 pt-BR
dňa 28. október, 2024 o 6:54PM
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.
Odpoveď od ticao2 🇧🇷 pt-BR
dňa 28. október, 2024 o 7:54PM
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