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);
}
};
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by ticao2 š§š· pt-BR
on October 28, 2024 at 6:54 PM
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.
Reply by ticao2 š§š· pt-BR
on October 28, 2024 at 7:54 PM
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