Skip to content

Commit

Permalink
fixup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shandianchengzi committed Apr 28, 2024
1 parent e543e31 commit 29b653c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pages/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
<h2 {...headerProps}><span >[{id.split('/')[0]}]</span> {title}</h2>
id ? (
<h2 {...headerProps}><span>[{id.split('/')[0]}]</span> {title}</h2>
) : (
<h2 {...headerProps}>{title}</h2>
)
) : (
<h3 {...headerProps}><span >[{id.split('/')[0]}]</span> {title}</h3>
id ? (
<h3 {...headerProps}><span>[{id.split('/')[0]}]</span> {title}</h3>
) : (
<h3 {...headerProps}>{title}</h3>
)
)}
</a>
{
Expand All @@ -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;
Expand Down

0 comments on commit 29b653c

Please sign in to comment.