diff --git a/apps/web/src/components/repo/repo-overview.tsx b/apps/web/src/components/repo/repo-overview.tsx index 2a61cc3..95dcd63 100644 --- a/apps/web/src/components/repo/repo-overview.tsx +++ b/apps/web/src/components/repo/repo-overview.tsx @@ -616,6 +616,7 @@ interface HotItem { comments: number; score: number; href: string; + createdAt: string; } function computeHotItems(prs: PRItem[], issues: IssueItem[], base: string): HotItem[] { @@ -627,6 +628,7 @@ function computeHotItems(prs: PRItem[], issues: IssueItem[], base: string): HotI comments: pr.comments ?? 0, score: (pr.comments ?? 0) * 2, href: `${base}/pulls/${pr.number}`, + createdAt: pr.created_at, })); const fromIssues: HotItem[] = issues .filter((i) => !i.pull_request) @@ -638,6 +640,7 @@ function computeHotItems(prs: PRItem[], issues: IssueItem[], base: string): HotI comments: issue.comments ?? 0, score: (issue.comments ?? 0) * 2 + (issue.reactions?.total_count ?? 0), href: `${base}/issues/${issue.number}`, + createdAt: issue.created_at, })); return [...fromPRs, ...fromIssues].sort((a, b) => b.score - a.score).slice(0, 6); } @@ -647,7 +650,7 @@ function TickerCard({ item }: { item: HotItem }) { return (
@@ -670,8 +673,11 @@ function TickerCard({ item }: { item: HotItem }) { {item.user?.login ?? "unknown"} + + {timeAgo(item.createdAt)} + {item.comments > 0 && ( - + {item.comments}