mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-30 05:14:06 +01:00
feat: compact format tech tree
This commit is contained in:
1 parent
c39351929c
commit
fe98d52c31
7 files changed
+24
-32
No files matched your search
@@ -19,6 +19,7 @@ import {
|
||||
} from '../../../../../../../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../../../../../../../core/blitzkit/tankDefinitions/constants';
|
||||
import { tankIcon } from '../../../../../../../core/blitzkit/tankIcon';
|
||||
import { formatCompact } from '../../../../../../../core/math/formatCompact';
|
||||
import * as Duel from '../../../../../../../stores/duel';
|
||||
import { ConfigurationChildWrapper } from './ConfigurationChildWrapper';
|
||||
|
||||
@@ -35,10 +36,6 @@ function ModuleButton({
|
||||
top: boolean;
|
||||
onClick: () => void;
|
||||
}) {
|
||||
const numberFormat = Intl.NumberFormat(undefined, {
|
||||
notation: 'compact',
|
||||
maximumFractionDigits: 0,
|
||||
});
|
||||
const isTank = unlock.type === 'vehicle';
|
||||
const button = (
|
||||
<IconButton
|
||||
@@ -77,7 +74,7 @@ function ModuleButton({
|
||||
gap={isTank ? '1' : undefined}
|
||||
>
|
||||
<Text size="1" color="gray">
|
||||
{numberFormat.format(unlock.cost.value)}
|
||||
{formatCompact(unlock.cost.value)}
|
||||
</Text>
|
||||
|
||||
<img
|
||||
|
||||
Reference in new issue
Block a user