28507550de
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.
32 lines
849 B
TypeScript
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>
|
|
);
|
|
}
|