diff --git a/packages/website-ue/src/components/Price/index.tsx b/packages/website-ue/src/components/Price/index.tsx index 2ee8feb0d..7da0fb868 100644 --- a/packages/website-ue/src/components/Price/index.tsx +++ b/packages/website-ue/src/components/Price/index.tsx @@ -39,7 +39,7 @@ function PriceEntry({ entry }: PriceEntryProps) { const [, iconName] = entry.currency_price.currency_catalog_id.split("."); return ( - +
{formatCompact(locale, entry.currency_price.amount)} diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.module.css b/packages/website-ue/src/components/TankopediaLoadout/index.module.css index 4cf2f3dea..d26528faf 100644 --- a/packages/website-ue/src/components/TankopediaLoadout/index.module.css +++ b/packages/website-ue/src/components/TankopediaLoadout/index.module.css @@ -21,7 +21,7 @@ width: 1em; height: 1em; - padding: var(--space-4) 0; + padding: var(--space-3) 0; transform: translate(var(--space-1), calc(-1 * var(--space-1))); } diff --git a/packages/website-ue/src/components/TankopediaLoadout/index.tsx b/packages/website-ue/src/components/TankopediaLoadout/index.tsx index 108433f55..a3db1c873 100644 --- a/packages/website-ue/src/components/TankopediaLoadout/index.tsx +++ b/packages/website-ue/src/components/TankopediaLoadout/index.tsx @@ -7,6 +7,7 @@ import { useMemo } from "react"; import { alternativeLines, isAlternativeLine, + originalLineName, } from "../../config/alternativeLines"; import { useProtagonist } from "../../hooks/useProtagonist"; import { useStrings } from "../../hooks/useStrings"; @@ -90,6 +91,7 @@ interface LineElementProps { function LineElement({ index, lineName, stage }: LineElementProps) { const upgrades = Tankopedia.use((state) => state.protagonist.upgrades); + const alternates = Tankopedia.use((state) => state.protagonist.alternates); const tank = useProtagonist(); const strings = useStrings(); const upgradePreset = useUpgradePreset(tank.tank!.tank_upgrade_preset); @@ -119,7 +121,18 @@ function LineElement({ index, lineName, stage }: LineElementProps) { price = override.price; } - const isSelected = upgrades[lineName] === index; + let isSelected: boolean; + + if (isAlternativeLine(lineName)) { + const originalLine = originalLineName(lineName); + isSelected = alternates[originalLine!]; + } else { + if (alternates[lineName]) { + isSelected = false; + } else { + isSelected = upgrades[lineName] === index; + } + } return (