Update components/dashboard/RecentZapsCard.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
mroxso
2025-04-18 17:37:07 +02:00
committed by GitHub
parent 275b523f2d
commit 4e9b717250

View File

@@ -22,6 +22,9 @@ export function RecentZapsCard({ zaps }: { zaps: Array<any> }) {
});
let percentages: { [key: string]: number } = {};
if (totalWeight === 0) {
return percentages; // Return an empty object if totalWeight is zero
}
for (let receiver in weights) {
percentages[receiver] = (weights[receiver] / totalWeight) * 100;
}