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

@@ -31,7 +31,7 @@ export default function GenericStatsRow({ stat }: GenericStatsRowProps) {
gap: 4,
}}
>
{stat[2] && <PercentileIndicator percentile={stat[2]} />}
{stat[2] !== undefined && <PercentileIndicator percentile={stat[2]} />}
{stat[1]}
</span>
</div>
+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[][] = [];