From 8d4966979ea3773d2614978a38ef77df57413a02 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Tue, 18 Nov 2025 22:01:17 +0100 Subject: [PATCH] feat: refactor ZapButton to use Button component for improved styling --- src/components/ZapButton.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/components/ZapButton.tsx b/src/components/ZapButton.tsx index bb3bbd8..5313a73 100644 --- a/src/components/ZapButton.tsx +++ b/src/components/ZapButton.tsx @@ -5,11 +5,13 @@ import { useCurrentUser } from '@/hooks/useCurrentUser'; import { useAuthor } from '@/hooks/useAuthor'; import { Zap } from 'lucide-react'; import type { Event } from 'nostr-tools'; +import { Button } from './ui/button'; interface ZapButtonProps { target: Event; className?: string; showCount?: boolean; + buttonVariant?: 'default' | 'outline' | 'ghost' | 'link' | 'destructive'; zapData?: { count: number; totalSats: number; isLoading?: boolean }; } @@ -17,6 +19,7 @@ export function ZapButton({ target, className = "text-xs ml-1", showCount = true, + buttonVariant = "outline", zapData: externalZapData }: ZapButtonProps) { const { user } = useCurrentUser(); @@ -41,18 +44,18 @@ export function ZapButton({ return ( -
- - - {showLoading ? ( - '...' - ) : showCount && totalSats > 0 ? ( - `${totalSats.toLocaleString()}` - ) : ( - 'Zap' - )} - -
+
); } \ No newline at end of file