fix(ui): hide null dates in episodes list (#3035)

pull/3033/head
Danshil Kokil Mungur 2 years ago committed by GitHub
parent 16cb53f703
commit 7404d68143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -191,7 +191,7 @@ export interface TmdbVideo {
export interface TmdbTvEpisodeResult {
id: number;
air_date: string;
air_date: string | null;
episode_number: number;
name: string;
overview: string;

@ -29,7 +29,7 @@ import type { Video } from './Movie';
interface Episode {
id: number;
name: string;
airDate: string;
airDate: string | null;
episodeNumber: number;
overview: string;
productionCode: string;

@ -41,7 +41,9 @@ const Season = ({ seasonNumber, tvId }: SeasonProps) => {
<div className="flex-1">
<div className="flex flex-col space-y-2 xl:flex-row xl:items-center xl:space-y-0 xl:space-x-2">
<h3 className="text-lg">{episode.name}</h3>
<AirDateBadge airDate={episode.airDate} />
{episode.airDate && (
<AirDateBadge airDate={episode.airDate} />
)}
</div>
{episode.overview && <p>{episode.overview}</p>}
</div>

@ -829,6 +829,7 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
</div>
)}
{data.nextEpisodeToAir &&
data.nextEpisodeToAir.airDate &&
data.nextEpisodeToAir.airDate !== data.firstAirDate && (
<div className="media-fact">
<span>{intl.formatMessage(messages.nextAirDate)}</span>

Loading…
Cancel
Save