mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-27 14:04:01 -05:00
allow searching by localized weapon name
This commit is contained in:
parent
8271ac0cca
commit
a7b944fe84
|
|
@ -38,9 +38,9 @@ const WeaponSelector: React.FC<WeaponSelectorProps> = ({
|
|||
<components.Option {...props}>
|
||||
<Flex alignItems="center" color={props.isFocused ? "black" : undefined}>
|
||||
<Box mr="0.5em">
|
||||
<WeaponImage size="SMALL" englishName={props.label} />
|
||||
<WeaponImage size="SMALL" englishName={props.value} />
|
||||
</Box>
|
||||
{t(`game;${props.label}`)}
|
||||
{props.label}
|
||||
</Flex>
|
||||
</components.Option>
|
||||
)
|
||||
|
|
@ -53,12 +53,18 @@ const WeaponSelector: React.FC<WeaponSelectorProps> = ({
|
|||
options={
|
||||
showAlts
|
||||
? weaponSelectOptionsWithAlts.map((category) => ({
|
||||
...category,
|
||||
label: t(`builds;${category.label}`),
|
||||
options: category.options.map((weapon) => ({
|
||||
value: weapon.value,
|
||||
label: t(`game;${weapon.value}`),
|
||||
})),
|
||||
}))
|
||||
: weaponSelectOptions.map((category) => ({
|
||||
...category,
|
||||
label: t(`builds;${category.label}`),
|
||||
options: category.options.map((weapon) => ({
|
||||
value: weapon.value,
|
||||
label: t(`game;${weapon.value}`),
|
||||
})),
|
||||
}))
|
||||
}
|
||||
value={value}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user