mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-06-09 06:10:06 +02:00
Update components/dashboard/RecentZapsCard.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user