From b0b07365be1c06c2ecbbcd1801d94304352ce856 Mon Sep 17 00:00:00 2001 From: TheMonkeyCoder Date: Thu, 24 Apr 2025 04:58:42 +0330 Subject: [PATCH] feat: disable zap button on the user's own notes (#300) --- src/components/NoteStats/ZapButton.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/NoteStats/ZapButton.tsx b/src/components/NoteStats/ZapButton.tsx index c23cdb8c..40302477 100644 --- a/src/components/NoteStats/ZapButton.tsx +++ b/src/components/NoteStats/ZapButton.tsx @@ -35,6 +35,7 @@ export default function ZapButton({ event }: { event: Event }) { useEffect(() => { client.fetchProfile(event.pubkey).then((profile) => { if (!profile) return + if (pubkey === profile.pubkey) return const lightningAddress = getLightningAddressFromProfile(profile) if (lightningAddress) setDisable(false) })