feat: added WN8 to /today

This commit is contained in:
TresAbhi committed 2023-06-02 01:31:14 +00:00
1 parent c5d14758d5
commit f801783358
14 files changed
+163 -51

No files matched your search

+3 -5
View File
@@ -2,8 +2,8 @@ import { Percentile } from '../../constants/percentiles.js';
import GenericStatsColumn from './components/GenericStatsColumn.js';
export type Stat =
| [string, string | number]
| [string, string | number, Percentile | undefined];
| [string, string | number | undefined]
| [string, string | number | undefined, Percentile | undefined];
export interface GenericStatsProps {
stats: Stat[];
@@ -14,9 +14,7 @@ export default function GenericStats({
stats,
columnCount = 2,
}: GenericStatsProps) {
const filteredStats = stats.filter(
([, value]) => `${value}` !== `${-Infinity}`,
);
const filteredStats = stats.filter(([, value]) => value !== undefined);
const itemsPerRow = Math.ceil(filteredStats.length / columnCount);
const columns: Stat[][] = [];