diff --git a/src/components/ui/link-card/LinkCard.tsx b/src/components/ui/link-card/LinkCard.tsx index 72f56520fc..413a49a99a 100644 --- a/src/components/ui/link-card/LinkCard.tsx +++ b/src/components/ui/link-card/LinkCard.tsx @@ -44,7 +44,7 @@ export const LinkCard = (props: LinkCardProps) => { } type CardState = { - title: ReactNode + title?: ReactNode desc?: ReactNode image?: string color?: string @@ -431,6 +431,9 @@ const fetchTheMovieDBData: FetchObject = { async fetch(id, setCardInfo, setFullUrl) { const [type, realId] = id.split('/') + setCardInfo({ + classNames: { cardRoot: '!w-full' }, + }) const json = await fetch(`/api/tmdb/${type}/${realId}?language=zh-CN`) .then((r) => r.json()) .catch((err) => { @@ -472,6 +475,6 @@ const fetchTheMovieDBData: FetchObject = { cardRoot: '!w-full', }, }) - setFullUrl(json.homepage) + json.homepage && setFullUrl(json.homepage) }, }