Browse Source

feat: disable zap button on the user's own notes (#300)

imwald
TheMonkeyCoder 11 months ago committed by GitHub
parent
commit
b0b07365be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      src/components/NoteStats/ZapButton.tsx

1
src/components/NoteStats/ZapButton.tsx

@ -35,6 +35,7 @@ export default function ZapButton({ event }: { event: Event }) {
useEffect(() => { useEffect(() => {
client.fetchProfile(event.pubkey).then((profile) => { client.fetchProfile(event.pubkey).then((profile) => {
if (!profile) return if (!profile) return
if (pubkey === profile.pubkey) return
const lightningAddress = getLightningAddressFromProfile(profile) const lightningAddress = getLightningAddressFromProfile(profile)
if (lightningAddress) setDisable(false) if (lightningAddress) setDisable(false)
}) })

Loading…
Cancel
Save