From 7aad04373481dd67baba08bdae5feaf8d1613af9 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Thu, 19 Feb 2026 16:04:16 -0600 Subject: [PATCH] Replace Repeat2 with custom RepostIcon, style repost/treasure action headers --- src/components/InteractionsModal.tsx | 5 +++-- src/components/NoteCard.tsx | 13 +++++++------ src/components/RepostMenu.tsx | 5 +++-- src/components/icons/RepostIcon.tsx | 29 ++++++++++++++++++++++++++++ src/pages/NotificationsPage.tsx | 7 ++++--- src/pages/PostDetailPage.tsx | 5 +++-- 6 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 src/components/icons/RepostIcon.tsx diff --git a/src/components/InteractionsModal.tsx b/src/components/InteractionsModal.tsx index 5e277d06..00a05d03 100644 --- a/src/components/InteractionsModal.tsx +++ b/src/components/InteractionsModal.tsx @@ -1,6 +1,7 @@ import { useState, useMemo } from 'react'; import { Link } from 'react-router-dom'; -import { Repeat2, Quote, Heart, Zap, X } from 'lucide-react'; +import { Quote, Heart, Zap, X } from 'lucide-react'; +import { RepostIcon } from '@/components/icons/RepostIcon'; import { nip19 } from 'nostr-tools'; import { @@ -50,7 +51,7 @@ export function InteractionsModal({ eventId, open, onOpenChange, initialTab = 'r const zapCount = data?.zaps.length ?? 0; const tabConfig: { key: InteractionTab; label: string; count: number; icon: React.ReactNode }[] = [ - { key: 'reposts', label: 'Reposts', count: repostCount, icon: }, + { key: 'reposts', label: 'Reposts', count: repostCount, icon: }, { key: 'quotes', label: 'Quotes', count: quoteCount, icon: }, { key: 'reactions', label: 'Reactions', count: reactionCount, icon: }, { key: 'zaps', label: 'Zaps', count: zapCount, icon: }, diff --git a/src/components/NoteCard.tsx b/src/components/NoteCard.tsx index a087df0b..e5b36c7d 100644 --- a/src/components/NoteCard.tsx +++ b/src/components/NoteCard.tsx @@ -1,5 +1,6 @@ import { Link, useNavigate } from 'react-router-dom'; -import { MessageCircle, Repeat2, Zap, MoreHorizontal, Play } from 'lucide-react'; +import { MessageCircle, Zap, MoreHorizontal, Play } from 'lucide-react'; +import { RepostIcon } from '@/components/icons/RepostIcon'; import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar'; import { Skeleton } from '@/components/ui/skeleton'; import { NoteContent } from '@/components/NoteContent'; @@ -316,7 +317,7 @@ export function NoteCard({ event, className, repostedBy, compact }: NoteCardProp className="flex items-center gap-1.5 p-2 rounded-full text-muted-foreground hover:text-green-500 hover:bg-green-500/10 transition-colors" title="Repost" > - + {(stats?.reposts || stats?.quotes) ? {(stats?.reposts ?? 0) + (stats?.quotes ?? 0)} : null} @@ -470,9 +471,9 @@ function RepostHeader({ pubkey }: { pubkey: string }) { const url = useMemo(() => getProfileUrl(pubkey, author.data?.metadata), [pubkey, author.data?.metadata]); return ( -
+
- +
{author.isLoading ? ( @@ -498,9 +499,9 @@ function TreasureHeader({ pubkey, variant }: { pubkey: string; variant: 'hid' | const url = useMemo(() => getProfileUrl(pubkey, author.data?.metadata), [pubkey, author.data?.metadata]); return ( -
+
- +
{author.isLoading ? ( diff --git a/src/components/RepostMenu.tsx b/src/components/RepostMenu.tsx index 8f05a6e6..5f214a8d 100644 --- a/src/components/RepostMenu.tsx +++ b/src/components/RepostMenu.tsx @@ -1,4 +1,5 @@ -import { Repeat2, Quote } from 'lucide-react'; +import { Quote } from 'lucide-react'; +import { RepostIcon } from '@/components/icons/RepostIcon'; import { useState } from 'react'; import type { NostrEvent } from '@nostrify/nostrify'; @@ -71,7 +72,7 @@ export function RepostMenu({ event, children }: RepostMenuProps) { }} className="flex items-center gap-3 w-full px-4 py-3 text-[15px] text-foreground hover:bg-secondary/60 transition-colors" > - + Repost diff --git a/src/pages/PostDetailPage.tsx b/src/pages/PostDetailPage.tsx index f541e2e0..5e91e83c 100644 --- a/src/pages/PostDetailPage.tsx +++ b/src/pages/PostDetailPage.tsx @@ -1,6 +1,7 @@ import { useMemo, useState, useCallback } from 'react'; import { Link, useNavigate } from 'react-router-dom'; -import { ArrowLeft, MessageCircle, Repeat2, Zap, MoreHorizontal, Radio, Loader2, AlertCircle, Copy, Check, ChevronRight } from 'lucide-react'; +import { ArrowLeft, MessageCircle, Zap, MoreHorizontal, Radio, Loader2, AlertCircle, Copy, Check, ChevronRight } from 'lucide-react'; +import { RepostIcon } from '@/components/icons/RepostIcon'; import { nip19 } from 'nostr-tools'; import type { NostrEvent } from '@nostrify/nostrify'; import { useNostr } from '@nostrify/react'; @@ -756,7 +757,7 @@ function PostDetailContent({ event }: { event: NostrEvent }) { className="flex items-center gap-1.5 p-2 rounded-full text-muted-foreground hover:text-green-500 hover:bg-green-500/10 transition-colors" title="Reposts" > - + {repostTotal ? {repostTotal} : null}