mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): fix tv shows failing to open when firstAirDate is undefined
fix #347
This commit is contained in:
@@ -56,7 +56,7 @@ export interface TvDetails {
|
|||||||
profilePath?: string;
|
profilePath?: string;
|
||||||
}[];
|
}[];
|
||||||
episodeRunTime: number[];
|
episodeRunTime: number[];
|
||||||
firstAirDate: string;
|
firstAirDate?: string;
|
||||||
genres: Genre[];
|
genres: Genre[];
|
||||||
homepage: string;
|
homepage: string;
|
||||||
inProduction: boolean;
|
inProduction: boolean;
|
||||||
|
@@ -21,7 +21,7 @@ interface TitleCardProps {
|
|||||||
id: number;
|
id: number;
|
||||||
image?: string;
|
image?: string;
|
||||||
summary?: string;
|
summary?: string;
|
||||||
year: string;
|
year?: string;
|
||||||
title: string;
|
title: string;
|
||||||
userScore: number;
|
userScore: number;
|
||||||
mediaType: MediaType;
|
mediaType: MediaType;
|
||||||
@@ -169,7 +169,7 @@ const TitleCard: React.FC<TitleCardProps> = ({
|
|||||||
>
|
>
|
||||||
<div className="absolute bottom-0 w-full left-0 right-0">
|
<div className="absolute bottom-0 w-full left-0 right-0">
|
||||||
<div className="px-2 text-white">
|
<div className="px-2 text-white">
|
||||||
<div className="text-sm">{year}</div>
|
{year && <div className="text-sm">{year}</div>}
|
||||||
|
|
||||||
<h1 className="text-xl leading-tight whitespace-normal">
|
<h1 className="text-xl leading-tight whitespace-normal">
|
||||||
{title}
|
{title}
|
||||||
|
@@ -227,8 +227,12 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<h1 className="text-2xl md:text-4xl">
|
<h1 className="text-2xl md:text-4xl">
|
||||||
{data.name}{' '}
|
<span>{data.name}</span>
|
||||||
<span className="text-2xl">({data.firstAirDate.slice(0, 4)})</span>
|
{data.firstAirDate && (
|
||||||
|
<span className="text-2xl ml-2">
|
||||||
|
({data.firstAirDate.slice(0, 4)})
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</h1>
|
</h1>
|
||||||
<span className="text-xs md:text-base mt-1 md:mt-0">
|
<span className="text-xs md:text-base mt-1 md:mt-0">
|
||||||
{data.genres.map((g) => g.name).join(', ')}
|
{data.genres.map((g) => g.name).join(', ')}
|
||||||
|
Reference in New Issue
Block a user