fix: sort collection parts by release date (#2368)

* fix: order collection parts by release date

* feat(frontend): add posters & release years to collection request modal

* fix(frontend): wrap movie titles in collection request modal
This commit is contained in:
TheCatLady
2021-12-30 22:06:12 -08:00
committed by GitHub
parent 340f1a2119
commit 1b3797cf6e
2 changed files with 26 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import { sortBy } from 'lodash';
import type { TmdbCollection } from '../api/themoviedb/interfaces';
import { MediaType } from '../constants/media';
import Media from '../entity/Media';
@@ -21,7 +22,7 @@ export const mapCollection = (
overview: collection.overview,
posterPath: collection.poster_path,
backdropPath: collection.backdrop_path,
parts: collection.parts.map((part) =>
parts: sortBy(collection.parts, 'release_date').map((part) =>
mapMovieResult(
part,
media?.find(