From 62c026a9a3aef2f6ffb701e4dd5547c96258d968 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 25 Mar 2026 19:13:38 -0500 Subject: [PATCH] Make repost rows in InteractionsModal link to the repost event Replace UserRow (profile link) with RepostRow (nevent link) in the reposts tab so clicking a repost navigates to the repost event detail view, matching the existing behavior for reactions. --- src/components/InteractionsModal.tsx | 77 ++++++++++++++-------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/components/InteractionsModal.tsx b/src/components/InteractionsModal.tsx index 0f96272f..3bc22d14 100644 --- a/src/components/InteractionsModal.tsx +++ b/src/components/InteractionsModal.tsx @@ -132,7 +132,7 @@ function RepostsTab({ reposts }: { reposts: RepostEntry[] }) { return (
{reposts.map((repost, i) => ( - + ))}
); @@ -231,6 +231,44 @@ function ZapsTab({ zaps }: { zaps: ZapEntry[] }) { /* ──── Shared Row Components ──── */ +function RepostRow({ entry }: { entry: RepostEntry }) { + const author = useAuthor(entry.pubkey); + const metadata = author.data?.metadata; + const avatarShape = getAvatarShape(metadata); + const displayName = metadata?.name || genUserName(entry.pubkey); + const nevent = useMemo(() => nip19.neventEncode({ id: entry.eventId, author: entry.pubkey }), [entry.eventId, entry.pubkey]); + + return ( + + + + + {displayName[0].toUpperCase()} + + + +
+
+ + {author.data?.event ? ( + {displayName} + ) : displayName} + + {metadata?.nip05 && ( + + )} +
+ {timeAgo(entry.createdAt)} +
+ + + + ); +} + function ReactionRow({ entry }: { entry: ReactionEntry }) { const author = useAuthor(entry.pubkey); const metadata = author.data?.metadata; @@ -269,43 +307,6 @@ function ReactionRow({ entry }: { entry: ReactionEntry }) { ); } -function UserRow({ pubkey, subtitle }: { pubkey: string; subtitle?: string }) { - const author = useAuthor(pubkey); - const metadata = author.data?.metadata; - const avatarShape = getAvatarShape(metadata); - const displayName = metadata?.name || genUserName(pubkey); - const npub = useMemo(() => nip19.npubEncode(pubkey), [pubkey]); - - return ( - - - - - {displayName[0].toUpperCase()} - - - -
-
- - {author.data?.event ? ( - {displayName} - ) : displayName} - - {metadata?.nip05 && ( - - )} -
- {subtitle && ( - {subtitle} - )} -
- - ); -} function ZapRow({ zap }: { zap: ZapEntry }) { const author = useAuthor(zap.senderPubkey);