feat: disable zap button on the user's own notes (#300)
This commit is contained in:
@@ -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)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user