import { Me, Thought } from "@/lib/api"; import { ThoughtCard } from "./thought-card"; import { Card, CardContent } from "./ui/card"; interface ThoughtListProps { thoughts: Thought[]; authorDetails: Map; currentUser: Me | null; } export function ThoughtList({ thoughts, authorDetails, currentUser, }: ThoughtListProps) { if (thoughts.length === 0) { return (

No thoughts to display.

); } return (
{thoughts.map((thought) => { const author = { username: thought.authorUsername, avatarUrl: null, ...authorDetails.get(thought.authorUsername), }; return ( ); })}
); }