From cd194aa639563003b4babaf6ff32ada2b4bfd6cc Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Mon, 16 Feb 2026 21:30:31 -0600 Subject: [PATCH] Fix emoji reactions display and remove stats border MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Map "+" and empty reactions to 👍 emoji so they appear in the stats row - Remove border-top from stats row and date-only row to match Ditto Co-authored-by: shakespeare.diy --- src/hooks/useTrending.ts | 4 +++- src/pages/PostDetailPage.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hooks/useTrending.ts b/src/hooks/useTrending.ts index 1e20e9e1..0a0099bf 100644 --- a/src/hooks/useTrending.ts +++ b/src/hooks/useTrending.ts @@ -143,7 +143,9 @@ export function useEventStats(eventId: string | undefined) { reactions++; // Extract the emoji from the reaction content (kind 7 events use content for the emoji) const emoji = e.content.trim(); - if (emoji && emoji !== '+' && emoji !== '-') { + if (emoji === '+' || emoji === '') { + reactionEmojiSet.add('👍'); + } else if (emoji !== '-') { reactionEmojiSet.add(emoji); } break; diff --git a/src/pages/PostDetailPage.tsx b/src/pages/PostDetailPage.tsx index 9cf4ebc2..87e5180d 100644 --- a/src/pages/PostDetailPage.tsx +++ b/src/pages/PostDetailPage.tsx @@ -175,9 +175,9 @@ function PostDetailContent({ event }: { event: NostrEvent }) { )} - {/* Stats row: "2 Reposts 1 Like" left, "Feb 16, 2026, 6:44 PM" right — Ditto style */} + {/* Stats row: "2 Reposts 1 👍" left, "Feb 16, 2026, 6:44 PM" right — Ditto style */} {hasStats && ( -
+
{stats?.reposts ? ( {stats.reposts}{' '} @@ -204,7 +204,7 @@ function PostDetailContent({ event }: { event: NostrEvent }) { {/* Date-only row if no stats */} {!hasStats && ( -
+
{formatFullDate(event.created_at)}
)} @@ -308,7 +308,7 @@ function PostDetailSkeleton() {
{/* Stats */} -
+