Hi I cannot seem to display the images associated with movies this is my search term https://api.themoviedb.org/3/search/movie?query=Jack+Reacher&api_key=`xyz_user`.
I have tried displaying the poster_path and also the backdrop_path and neither work as far as I can tell.
I have failed in react next.js and postman, have tried appending to path in the .jsx file like so
// const moviesWithSlash = data.results.map(movies => ({ ...movies, poster_path: '/' + movies.poster_path // Add a forward slash before the backdrop_path }));
//Errors handled
if(!response.ok){
throw new Error(`Failed to fetch movies - Error ${response.status}: ${data.message}`)
}
return {
props: {
movies: data.results,
picture: moviesWithSlash
},
Can you help please?
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?