mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -04:00
Fix episode name without metadata
This commit is contained in:
parent
dad0a7d30a
commit
bb4e7b7712
@ -44,16 +44,18 @@ export const EpisodeBox = ({
|
|||||||
thumbnail,
|
thumbnail,
|
||||||
isLoading,
|
isLoading,
|
||||||
...props
|
...props
|
||||||
}: WithLoading<{
|
}: Stylable &
|
||||||
name: string;
|
WithLoading<{
|
||||||
overview: string;
|
name: string | null;
|
||||||
thumbnail?: string | null;
|
overview: string;
|
||||||
}> &
|
thumbnail?: string | null;
|
||||||
Stylable) => {
|
}>) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View {...props}>
|
<View {...props}>
|
||||||
<Image src={thumbnail} alt="" layout={{ width: percent(100), aspectRatio: 16 / 9 }} />
|
<Image src={thumbnail} alt="" layout={{ width: percent(100), aspectRatio: 16 / 9 }} />
|
||||||
<Skeleton>{isLoading || <P>{name}</P>}</Skeleton>
|
<Skeleton>{isLoading || <P>{name ?? t("show.episodeNoMetadata")}</P>}</Skeleton>
|
||||||
<Skeleton>{isLoading || <P>{overview}</P>}</Skeleton>
|
<Skeleton>{isLoading || <P>{overview}</P>}</Skeleton>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@ -70,8 +72,8 @@ export const EpisodeLine = ({
|
|||||||
}: WithLoading<{
|
}: WithLoading<{
|
||||||
slug: string;
|
slug: string;
|
||||||
displayNumber: string;
|
displayNumber: string;
|
||||||
name: string;
|
name: string | null;
|
||||||
overview: string;
|
overview: string | null;
|
||||||
thumbnail?: string | null;
|
thumbnail?: string | null;
|
||||||
}> &
|
}> &
|
||||||
Stylable) => {
|
Stylable) => {
|
||||||
|
@ -50,8 +50,7 @@ export const EpisodeList = ({
|
|||||||
{(item) => (
|
{(item) => (
|
||||||
<EpisodeLine
|
<EpisodeLine
|
||||||
{...item}
|
{...item}
|
||||||
isLoading={item.isLoading}
|
displayNumber={item.isLoading ? undefined! : episodeDisplayNumber(item)!}
|
||||||
displayNumber={item.isLoading ? undefined : episodeDisplayNumber(item)}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</InfiniteFetch>
|
</InfiniteFetch>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user