mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: percentile indicator
This commit is contained in:
1 parent
1d04513bb1
commit
de857e7263
10 files changed
+112
-8
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import getWN8Percentile from '../core/blitz/getWN8Percentile.js';
|
||||
import { AllStats, SupplementaryStats } from '../types/accountInfo.js';
|
||||
import GenericStats from './GenericStats/index.js';
|
||||
|
||||
@@ -14,7 +15,13 @@ export default function GenericAllStats({
|
||||
<GenericStats
|
||||
stats={[
|
||||
['Winrate', `${(100 * (stats.wins / stats.battles)).toFixed(2)}%`],
|
||||
['WN8', supplementaryStats?.wn8.toFixed(0) ?? -Infinity],
|
||||
[
|
||||
'WN8',
|
||||
supplementaryStats?.WN8.toFixed(0) ?? -Infinity,
|
||||
supplementaryStats
|
||||
? getWN8Percentile(supplementaryStats.WN8)
|
||||
: undefined,
|
||||
],
|
||||
[
|
||||
'Survival',
|
||||
`${(100 * (stats.survived_battles / stats.battles)).toFixed(2)}%`,
|
||||
|
||||
Reference in new issue
Block a user