le8i2digy: Add a refresh button to the Home feed header and singularize one comment

This commit is contained in:
2026-10-20 08:08:38 -06:00
parent 3f0595ad55
commit 69a11436f5
7 changed files with 123 additions and 11 deletions
+5
View File
@@ -194,6 +194,11 @@ export function upgradeVideos(current: CardPost[], fresh: CardPost[]): CardPost[
return changed ? next : current;
}
/** "1 comment", "0 comments", "2 comments". */
export function commentsLabel(count: number): string {
return count === 1 ? "1 comment" : `${count} comments`;
}
export function relativeTime(publishedAt: string | null, now: number = Date.now()): string {
const t = publishedAt ? Date.parse(publishedAt) : NaN;
if (!Number.isFinite(t)) return "";