A vibe coded tangled fork which supports pijul.
at master 33 lines 824 B view raw
1import { Row } from "./layout"; 2import { Calendar, MessageSquare, SmilePlus } from "../../icons/lucide"; 3import { StatItem } from "./stat-item"; 4 5interface FooterStatsProps { 6 createdAt: string; 7 reactionCount?: number; 8 commentCount?: number; 9} 10 11export function FooterStats({ 12 createdAt, 13 reactionCount, 14 commentCount, 15}: FooterStatsProps) { 16 const formattedDate = new Intl.DateTimeFormat("en-GB", { 17 day: "numeric", 18 month: "short", 19 year: "numeric", 20 }).format(new Date(createdAt)); 21 22 return ( 23 <Row style={{ gap: 64 }}> 24 <StatItem Icon={Calendar} value={formattedDate} /> 25 {reactionCount ? ( 26 <StatItem Icon={SmilePlus} value={reactionCount} /> 27 ) : null} 28 {commentCount ? ( 29 <StatItem Icon={MessageSquare} value={commentCount} /> 30 ) : null} 31 </Row> 32 ); 33}