Skip to content

Commit e582aac

Browse files
wip
1 parent c7ee4d7 commit e582aac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/src/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const calculatePercentage = (value, total) => {
2+
if (total === 0) return 0;
3+
return Math.round((value / total) * 100);
4+
};

0 commit comments

Comments
 (0)