feat: 1.3.3

This commit is contained in:
TresAbhi committed 2023-05-29 17:12:05 +00:00
1 parent d62708c21e
commit 7a6de17c1c
5 files changed
+45 -37

No files matched your search

+3 -2
View File
@@ -11,10 +11,11 @@ export default function GenericStats({
stats,
columnCount = 2,
}: GenericStatsProps) {
const itemsPerRow = Math.ceil(stats.length / columnCount);
const filteredStats = stats.filter(([, value]) => value !== `${-Infinity}`);
const itemsPerRow = Math.ceil(filteredStats.length / columnCount);
const columns: Stat[][] = [];
stats.forEach((stat, index) => {
filteredStats.forEach((stat, index) => {
const column = Math.floor(index / itemsPerRow);
if (!columns[column]) columns[column] = [];
columns[column].push(stat);