import { TaggedNostrEvent, u256 } from "@snort/system"; import { Fragment } from "react"; import Note from "@/Components/Event/EventComponent"; import { Divider } from "@/Components/Event/Thread/Divider"; import { TierTwo } from "@/Components/Event/Thread/TierTwo"; import { getReplies } from "@/Components/Event/Thread/util"; export interface SubthreadProps { isLastSubthread?: boolean; active: u256; notes: readonly TaggedNostrEvent[]; chains: Map>; onNavigate: (e: TaggedNostrEvent) => void; } export const Subthread = ({ active, notes, chains, onNavigate }: SubthreadProps) => { const renderSubthread = (a: TaggedNostrEvent, idx: number) => { const isLastSubthread = idx === notes.length - 1; const replies = getReplies(a.id, chains); return (
0 ? "subthread-multi" : ""}`}> 5} />
{replies.length > 0 && ( )}
); }; return
{notes.map(renderSubthread)}
; };