updated date order to be InCinemas and then the earlier of either Physical/Digital Release

This commit is contained in:
Robin Dadswell 2021-01-11 14:26:21 +00:00 committed by Qstick
parent c28b62da2a
commit b6e46ad8fd
1 changed files with 8 additions and 6 deletions

View File

@ -135,6 +135,7 @@ class MovieIndexPoster extends Component {
let releaseDate = ''; let releaseDate = '';
if (showReleaseDate) { if (showReleaseDate) {
releaseDate = inCinemas; releaseDate = inCinemas;
if (!inCinemas) {
if (physicalRelease && digitalRelease) { if (physicalRelease && digitalRelease) {
releaseDate = (physicalRelease < digitalRelease) ? physicalRelease : digitalRelease; releaseDate = (physicalRelease < digitalRelease) ? physicalRelease : digitalRelease;
} else if (physicalRelease && !digitalRelease) { } else if (physicalRelease && !digitalRelease) {
@ -143,6 +144,7 @@ class MovieIndexPoster extends Component {
releaseDate = digitalRelease; releaseDate = digitalRelease;
} }
} }
}
return ( return (
<div className={styles.content}> <div className={styles.content}>