feat: sort label

This commit is contained in:
TrèsAbhi committed 2024-06-25 18:38:53 -05:00
1 parent e0e8c3554a
commit 9485b0e36c
3 files changed
+44 -2

No files matched your search

+29
View File
@@ -134,6 +134,35 @@ export const SORT_NAMES = {
'maneuverability.traverseSpeed': 'traverse speed',
} as const;
export const SORT_UNITS: Record<TankopediaSortBy, string | undefined> = {
'meta.none': undefined,
'survivability.health': 'hp',
'fire.aimTime': 's',
'fire.caliber': 'mm',
'fire.damage': 'hp',
'fire.dispersionMoving': 'm',
'fire.dispersionStill': 'm',
'fire.dpm': undefined,
'fire.gunDepression': '°',
'fire.gunElevation': '°',
'fire.premiumPenetration': 'mm',
'fire.reload': 's',
'fire.shellVelocity': 'm/s',
'fire.standardPenetration': 'mm',
'maneuverability.backwardsSpeed': 'kph',
'maneuverability.forwardsSpeed': 'kph',
'maneuverability.power': 'hp',
'maneuverability.powerToWeight': 'hp/tn',
'maneuverability.traverseSpeed': '°/s',
'maneuverability.weight': 'tn',
'survivability.camouflageMoving': '%',
'survivability.camouflageShooting': '%',
'survivability.camouflageStill': '%',
'survivability.length': 'm',
'survivability.viewRange': 'm',
'survivability.volume': 'm^3',
};
export const useTankopediaPersistent = create<TankopediaPersistent>()(
persist(
subscribeWithSelector<TankopediaPersistent>(() => ({