import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { UserAvatar } from "./user-avatar"; import { Thought } from "@/lib/api"; import { formatDistanceToNow } from "date-fns"; interface ThoughtCardProps { thought: Thought; author: { username: string; avatarUrl?: string | null; }; } export function ThoughtCard({ thought, author }: ThoughtCardProps) { const timeAgo = formatDistanceToNow(new Date(thought.createdAt), { addSuffix: true, }); return (
{author.username} {timeAgo}

{thought.content}

); }