diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index 07204b42a..f0a7b00dc 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -26,8 +26,8 @@ "shells": { "ap": "AP", - "apcr": "APCR", - "heat": "HEAT", + "ap_cr": "APCR", + "hc": "HEAT", "he": "HE" }, diff --git a/packages/website/src/components/TankSearch/components/FilterControl.tsx b/packages/website/src/components/TankSearch/components/FilterControl.tsx index f8d9b372d..6e57a2164 100644 --- a/packages/website/src/components/TankSearch/components/FilterControl.tsx +++ b/packages/website/src/components/TankSearch/components/FilterControl.tsx @@ -14,8 +14,6 @@ import { DropdownMenu, Flex, IconButton, - Inset, - Popover, Text, } from "@radix-ui/themes"; import { times } from "lodash-es"; @@ -492,13 +490,7 @@ function TypeFilter() { function ShellFilter() { return ( - + @@ -513,12 +505,24 @@ function IndividualShellFilter({ index: number; premium?: boolean; }) { + const { strings } = useLocale(); const shells = TankFilters.use((state) => state.shells); return ( - - - + + + {shells[index] === null && ( @@ -535,48 +539,51 @@ function IndividualShellFilter({ /> )} - + - - - - {Object.values(ShellType).map((shellType) => { - if (typeof shellType === "string") return null; + + + {Object.values(ShellType).map((shellType) => { + if (typeof shellType === "string") return null; - const selected = shells[index] === shellType; + const selected = shells[index] === shellType; - return ( - { - const mutated = [...shells] as TankFilters["shells"]; + return ( + { + const mutated = [...shells] as TankFilters["shells"]; - mutated[index] = selected ? null : shellType; + mutated[index] = selected ? null : shellType; - TankFilters.mutate((draft) => { - draft.shells = mutated; - }); - }} - highContrast={selected} - color={selected ? undefined : "gray"} - > - - - ); - })} - - - - + TankFilters.mutate((draft) => { + draft.shells = mutated; + }); + }} + color={selected ? undefined : "gray"} + > + + + { + strings.common.shells[ + shellTypeIcons[ + shellType + ] as keyof typeof strings.common.shells + ] + } + + ); + })} + + + ); } diff --git a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx index 2cc5643ef..4a02f6a3b 100644 --- a/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx +++ b/packages/website/src/components/Tankopedia/HeroSection/components/Options/components/CustomShellButton.tsx @@ -108,10 +108,10 @@ export function CustomShellButton() { {strings.common.shells.ap} - {strings.common.shells.apcr} + {strings.common.shells.ap_cr} - {strings.common.shells.heat} + {strings.common.shells.hc} {strings.common.shells.he}