fix: total zaps in profile

This commit is contained in:
Alejandro Gomez 2023-02-03 23:39:53 +01:00
parent e795ea2b12
commit d08639fffb
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

View File

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