From 29b653c7a12b831b7f1e90e7a757702fa59d7091 Mon Sep 17 00:00:00 2001 From: shandianchengzi <1252402849@qq.com> Date: Sun, 28 Apr 2024 16:56:43 +0800 Subject: [PATCH] fixup. --- pages/src/components/Card.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/src/components/Card.tsx b/pages/src/components/Card.tsx index e34ec2d..9c9d9ee 100644 --- a/pages/src/components/Card.tsx +++ b/pages/src/components/Card.tsx @@ -28,9 +28,17 @@ export default function Card({ id, href, frontmatter, secHeading = true, body }: className="flex-1 inline-block text-lg font-medium text-skin-accent decoration-dashed underline-offset-4 focus-visible:no-underline focus-visible:underline-offset-0" > {secHeading ? ( -

[{id.split('/')[0]}] {title}

+ id ? ( +

[{id.split('/')[0]}] {title}

+ ) : ( +

{title}

+ ) ) : ( -

[{id.split('/')[0]}] {title}

+ id ? ( +

[{id.split('/')[0]}] {title}

+ ) : ( +

{title}

+ ) )} { @@ -47,7 +55,7 @@ export default function Card({ id, href, frontmatter, secHeading = true, body }: ); } -function Status({ status, id }: { status: string, id: string }) { +function Status({ status, id }: { status: string, id: string | undefined }) { const getStyle = (status: string) => { var s = STATUS_LIST.find(s => s.status === status); if (s) return s.color;