diff --git a/components/top-list.tsx b/components/top-list.tsx index d0740d9..80e2f2b 100644 --- a/components/top-list.tsx +++ b/components/top-list.tsx @@ -27,6 +27,7 @@ type Props = { export function TopList({ userResults }: Props) { const cardDetails = (data: { title: string; + titleHref?: string; subtitle?: string; score?: number; badges: { tooltip?: string; label?: any; icon: any }[]; @@ -37,7 +38,20 @@ export function TopList({ userResults }: Props) { key={data.key} >
-
{data.title}
+
+ {data.titleHref ? ( + + {data.title} + + ) : ( + data.title + )} +
{data.subtitle}
@@ -88,6 +102,9 @@ export function TopList({ userResults }: Props) { cardDetails({ key: `repo-${i}`, title: repo.name || "Unknown Repository", + titleHref: repo.name + ? `https://github.com/${user.username}/${repo.name}` + : undefined, score: repo.score, badges: [ {