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

This commit is contained in:
TheMonkeyCoder 2025-04-24 04:58:42 +03:30 committed by GitHub
parent 5473c22c3f
commit b0b07365be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
})