mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-08-13 06:09:13 +00:00
🐛 fix badges count issue
This commit is contained in:
parent
be0e7d3018
commit
3f374836ee
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,9 @@ const useBadges = () => {
|
|||
const inventory = useSelector(selectInventory);
|
||||
const itemData = useItemData();
|
||||
|
||||
return inventory.filter((item) => itemData[item.item].badge);
|
||||
return inventory.filter(
|
||||
(item) => itemData[item.item].badge && item.amount > 0
|
||||
);
|
||||
};
|
||||
|
||||
export default useBadges;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue