forked from Kieran/snort
fix: total zaps in profile
This commit is contained in:
parent
e795ea2b12
commit
d08639fffb
@ -63,7 +63,7 @@ export default function ProfilePage() {
|
|||||||
: user?.website || "";
|
: user?.website || "";
|
||||||
const zapFeed = useZapsFeed(id)
|
const zapFeed = useZapsFeed(id)
|
||||||
const zaps = useMemo(() => {
|
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])
|
}, [zapFeed.store.notes, id])
|
||||||
const zapsTotal = zaps.reduce((acc, z) => acc + z.amount, 0)
|
const zapsTotal = zaps.reduce((acc, z) => acc + z.amount, 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user