import { Row } from "./layout"; import { Calendar, MessageSquare, SmilePlus } from "../../icons/lucide"; import { StatItem } from "./stat-item"; import { Avatar } from "./avatar"; import { TYPOGRAPHY } from "./constants"; interface FooterStatsProps { createdAt: string; authorHandle?: string; authorAvatarUrl?: string; reactionCount?: number; commentCount?: number; } export function FooterStats({ createdAt, authorHandle, authorAvatarUrl, reactionCount, commentCount, }: FooterStatsProps) { const formattedDate = new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", year: "numeric", }).format(new Date(createdAt)); const handleLength = authorHandle?.length ?? 0; const showReactions = handleLength <= 16; const showComments = handleLength <= 11; return ( {authorHandle && authorAvatarUrl ? ( {authorHandle} ) : null} {showReactions && reactionCount ? ( ) : null} {showComments && commentCount ? ( ) : null} ); }