From 8a1483f5f9931cc4354feda57bc1070e31c40ee8 Mon Sep 17 00:00:00 2001 From: aoi-dev-0411 Date: Sun, 12 Apr 2026 10:01:43 +0900 Subject: [PATCH] feat: make repository titles clickable links to GitHub (closes #60) Wrap repository name text in anchor tags pointing to https://github.com/{username}/{reponame} with target=_blank and rel=noopener noreferrer for security. Co-Authored-By: Claude Sonnet 4.6 --- components/top-list.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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: [ {