Skip to content

Commit

Permalink
show fashion/mods filter pills only when relevant loadouts exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nev-r committed Apr 8, 2024
1 parent c563d4e commit e2b3a2c
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/app/loadout/loadout-ui/menu-hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,23 @@ function useLoadoutFilterPillsInternal(
}, [defs, savedLoadouts]);
if (loadoutsByType) {
for (const k of loadoutSpecializations) {
filterOptions.push({
key: k,
value: { tag: 'loadout-type', type: k },
content: (
<>
{k === 'Loadouts.ModsOnly' ? (
<ModificationsIcon className="" />
) : (
<FashionIcon className="" />
)}
{t(k)}
{` (${loadoutsByType[k].length})`}
</>
),
});
if (loadoutsByType[k].length) {
filterOptions.push({
key: k,
value: { tag: 'loadout-type', type: k },
content: (
<>
{k === 'Loadouts.ModsOnly' ? (
<ModificationsIcon className="" />
) : (
<FashionIcon className="" />
)}
{t(k)}
{` (${loadoutsByType[k].length})`}
</>
),
});
}
}
}

Expand Down

0 comments on commit e2b3a2c

Please sign in to comment.