import { Me, Thought } from "@/lib/api"; import { ThoughtCard } from "./thought-card"; interface ThoughtThreadProps { thought: Thought; repliesByParentId: Map; authorDetails: Map; currentUser: Me | null; isReply?: boolean; } export function ThoughtThread({ thought, repliesByParentId, authorDetails, currentUser, isReply = false, }: ThoughtThreadProps) { const author = { username: thought.authorUsername, avatarUrl: null, ...authorDetails.get(thought.authorUsername), }; const directReplies = repliesByParentId.get(thought.id) || []; return (
{directReplies.length > 0 && (
{directReplies.map((reply) => ( ))}
)}
); }