mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: player count
This commit is contained in:
1 parent
1d112bb633
commit
db83ac40b4
10 files changed
+49
-45
No files matched your search
@@ -2,15 +2,11 @@
|
||||
|
||||
import { InfoCircledIcon } from '@radix-ui/react-icons';
|
||||
import { Callout, Flex } from '@radix-ui/themes';
|
||||
import { use, useMemo } from 'react';
|
||||
import { averageDefinitionsArray } from '../../../../core/blitzkit/averageDefinitions';
|
||||
import { use } from 'react';
|
||||
import { averageDefinitions } from '../../../../core/blitzkit/averageDefinitions';
|
||||
|
||||
export function Info() {
|
||||
const awaitedAverageDefinitionsArray = use(averageDefinitionsArray);
|
||||
const samples = useMemo(
|
||||
() => awaitedAverageDefinitionsArray.reduce((a, b) => a + b.samples, 0),
|
||||
[],
|
||||
);
|
||||
const awaitedAverageDefinitions = use(averageDefinitions);
|
||||
|
||||
return (
|
||||
<Flex justify="center">
|
||||
@@ -19,9 +15,9 @@ export function Info() {
|
||||
<InfoCircledIcon />
|
||||
</Callout.Icon>
|
||||
<Callout.Text>
|
||||
Based on {samples.toLocaleString()} players with at least 5,000 career
|
||||
battles and 1 battle in the past 120 days. Stats displayed as an
|
||||
average per battle. Updated daily.
|
||||
Based on {awaitedAverageDefinitions.players.toLocaleString()} players
|
||||
with at least 5,000 career battles and 1 battle in the past 120 days.
|
||||
Player counts are less than real values. Updated daily.
|
||||
</Callout.Text>
|
||||
</Callout.Root>
|
||||
</Flex>
|
||||
|
||||
Reference in new issue
Block a user