mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
fix pokemon error
This commit is contained in:
parent
731ef6a9aa
commit
5419430369
3 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ export type JWMediaResult = {
|
|||
title: string;
|
||||
poster?: string;
|
||||
id: number;
|
||||
original_release_year: number;
|
||||
original_release_year?: number;
|
||||
jw_entity_id: string;
|
||||
object_type: JWContentTypes;
|
||||
seasons?: JWSeasonShort[];
|
||||
|
@ -67,7 +67,7 @@ export function formatJWMeta(
|
|||
return {
|
||||
title: media.title,
|
||||
id: media.id.toString(),
|
||||
year: media.original_release_year.toString(),
|
||||
year: media.original_release_year?.toString(),
|
||||
poster: media.poster
|
||||
? `${JW_IMAGE_BASE}${media.poster.replace("{profile}", "s166")}`
|
||||
: undefined,
|
||||
|
|
|
@ -24,7 +24,7 @@ export type MWSeasonWithEpisodeMeta = {
|
|||
type MWMediaMetaBase = {
|
||||
title: string;
|
||||
id: string;
|
||||
year: string;
|
||||
year?: string;
|
||||
poster?: string;
|
||||
};
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@ function MediaCardContent({
|
|||
|
||||
const canLink = linkable && !closable;
|
||||
|
||||
const dotListContent = [t(`media.${media.type}`)];
|
||||
if (media.year) dotListContent.push(media.year);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`group -m-3 mb-2 rounded-xl bg-denim-300 bg-opacity-0 transition-colors duration-100 ${
|
||||
|
@ -115,10 +118,7 @@ function MediaCardContent({
|
|||
<h1 className="mb-1 max-h-[4.5rem] text-ellipsis break-words font-bold text-white line-clamp-3">
|
||||
<span>{media.title}</span>
|
||||
</h1>
|
||||
<DotList
|
||||
className="text-xs"
|
||||
content={[t(`media.${media.type}`), media.year]}
|
||||
/>
|
||||
<DotList className="text-xs" content={dotListContent} />
|
||||
</article>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue