feat: organize files

This commit is contained in:
TrèsAbhi committed 2024-03-12 23:36:56 -05:00
1 parent f02fb00e8c
commit f79f1ffdc3
102 files changed
+486 -502

No files matched your search

+3 -3
View File
@@ -1,12 +1,12 @@
import { Percentile } from '../../constants/percentiles';
import GenericStatsColumn from './components/GenericStatsColumn';
export type Stat =
export type GenericStat =
| [string, string | number | undefined]
| [string, string | number | undefined, Percentile | undefined];
export interface GenericStatsProps {
stats: Stat[];
stats: GenericStat[];
columnCount?: number;
}
@@ -16,7 +16,7 @@ export default function GenericStats({
}: GenericStatsProps) {
const filteredStats = stats.filter(([, value]) => value !== undefined);
const itemsPerRow = Math.ceil(filteredStats.length / columnCount);
const columns: Stat[][] = [];
const columns: GenericStat[][] = [];
filteredStats.forEach((stat, index) => {
const column = Math.floor(index / itemsPerRow);