fix(tv): don't show duplicate air date (#1666)

Only show the First Air Date if it is the same as the Next Air Date
pull/1667/head
Danshil Kokil Mungur 4 years ago committed by GitHub
parent d22400dbc9
commit e1f5febe7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -597,18 +597,19 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
</span>
</div>
)}
{data.nextEpisodeToAir && (
<div className="media-fact">
<span>{intl.formatMessage(messages.nextAirDate)}</span>
<span className="media-fact-value">
{intl.formatDate(data.nextEpisodeToAir.airDate, {
year: 'numeric',
month: 'long',
day: 'numeric',
})}
</span>
</div>
)}
{data.nextEpisodeToAir &&
data.nextEpisodeToAir.airDate !== data.firstAirDate && (
<div className="media-fact">
<span>{intl.formatMessage(messages.nextAirDate)}</span>
<span className="media-fact-value">
{intl.formatDate(data.nextEpisodeToAir.airDate, {
year: 'numeric',
month: 'long',
day: 'numeric',
})}
</span>
</div>
)}
{data.episodeRunTime.length > 0 && (
<div className="media-fact">
<span>{intl.formatMessage(messages.episodeRuntime)}</span>

Loading…
Cancel
Save