dont count self zaps

This commit is contained in:
Alejandro Gomez 2023-02-04 13:07:57 +01:00
parent 02bd53da9f
commit 1317669149
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

@ -64,7 +64,7 @@ export default function ProfilePage() {
: user?.website || "";
const zapFeed = useZapsFeed(id)
const zaps = useMemo(() => {
const profileZaps = zapFeed.store.notes.map(parseZap).filter(z => z.valid && z.p === id && !z.e)
const profileZaps = zapFeed.store.notes.map(parseZap).filter(z => z.valid && z.p === id && !z.e && z.zapper !== id)
profileZaps.sort((a, b) => b.amount - a.amount)
return profileZaps
}, [zapFeed.store.notes, id])