refactoring: first render improvements

This commit is contained in:
ner committed 2024-10-21 18:57:49 +03:00
1 parent 38aebcbe28
commit 0cface89bf
13 files changed
+38 -33

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@ export const mapMovieSeriesToShow = (
rating: vote_average,
votes: vote_count,
backdrop: backdrop_path ? `https://image.tmdb.org/t/p/w1280/${backdrop_path}` : '',
poster: poster_path ? `https://image.tmdb.org/t/p/w500/${poster_path}` : '',
poster: poster_path ? `https://image.tmdb.org/t/p/w342/${poster_path}` : '',
release: 'release_date' in item ? item.release_date : item.first_air_date,
title: 'release_date' in item ? item.title : item.name
});
@@ -20,7 +20,7 @@ const mapMoviesSeriesResponseToShows = (
page,
total: total_pages,
results: results
.map(show => mapMovieSeriesToShow(show, type))
.map((show) => mapMovieSeriesToShow(show, type))
.filter((show) => show.votes && show.release && show.backdrop && show.poster)
});