fix(frontend): only show weapon-type chips when item type is Weapons
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
d6fa0fa9b0
commit
29f8bec046
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ export function ActiveChips({ search }: { search: InventorySearch }) {
|
|||
label: f.itemType[0].toUpperCase() + f.itemType.slice(1),
|
||||
remove: () => update({ itemType: 'all', weaponTypes: [] }),
|
||||
});
|
||||
for (const wt of f.weaponTypes) {
|
||||
if (f.itemType === 'weapon') for (const wt of f.weaponTypes) {
|
||||
const label = WEAPON_TYPES.find(w => w.value === wt)?.label ?? wt;
|
||||
chips.push({ label, remove: () => update({ weaponTypes: f.weaponTypes.filter(x => x !== wt) }) });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue