From e1f5febe7bbf27e77b6f5d057c2c3f7e22898734 Mon Sep 17 00:00:00 2001 From: Danshil Kokil Mungur Date: Wed, 19 May 2021 04:57:12 +0400 Subject: [PATCH] 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 --- src/components/TvDetails/index.tsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx index 60f39f8bf..a1473d774 100644 --- a/src/components/TvDetails/index.tsx +++ b/src/components/TvDetails/index.tsx @@ -597,18 +597,19 @@ const TvDetails: React.FC = ({ tv }) => { )} - {data.nextEpisodeToAir && ( -
- {intl.formatMessage(messages.nextAirDate)} - - {intl.formatDate(data.nextEpisodeToAir.airDate, { - year: 'numeric', - month: 'long', - day: 'numeric', - })} - -
- )} + {data.nextEpisodeToAir && + data.nextEpisodeToAir.airDate !== data.firstAirDate && ( +
+ {intl.formatMessage(messages.nextAirDate)} + + {intl.formatDate(data.nextEpisodeToAir.airDate, { + year: 'numeric', + month: 'long', + day: 'numeric', + })} + +
+ )} {data.episodeRunTime.length > 0 && (
{intl.formatMessage(messages.episodeRuntime)}