mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: added WN8 to /today
This commit is contained in:
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>
|
||||
|
||||
@@ -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[][] = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user