Files
eranos/src/components/ThreadedReplyList.tsx
T
Alex Gleason 28507550de Restore border-b to NoteCard, remove compensating divide-y from containers
The original border-b border-border was removed from NoteCard in 9bd646b
for a photos overlay feature that no longer uses NoteCard. This forced
every container to add divide-y divide-border as a workaround, but
several pages were missed (Bookmarks, Events, Trends, Search, etc).

Restore NoteCard's self-bordering and remove the now-redundant divide-y
wrappers. Existing overrides (EmbeddedNaddr !border-b, Notifications
border-0) continue to work correctly.
2026-03-02 12:00:13 -06:00

32 lines
849 B
TypeScript

import type { NostrEvent } from '@nostrify/nostrify';
import { NoteCard } from '@/components/NoteCard';
export interface ThreadedReply {
reply: NostrEvent;
firstSubReply?: NostrEvent;
}
interface ThreadedReplyListProps {
replies: ThreadedReply[];
}
/**
* Renders a flat list of replies where each top-level reply is optionally
* followed by its first sub-reply, using NoteCard's threaded/threadedLast
* connector-line styling for visual continuity.
*/
export function ThreadedReplyList({ replies }: ThreadedReplyListProps) {
return (
<div>
{replies.map(({ reply, firstSubReply }) => (
<div key={reply.id}>
<NoteCard event={reply} threaded={!!firstSubReply} />
{firstSubReply && (
<NoteCard event={firstSubReply} threadedLast />
)}
</div>
))}
</div>
);
}