diff --git a/src/hooks/inventory/useInventoryBadges.ts b/src/hooks/inventory/useInventoryBadges.ts index e5d46620..80d775d0 100644 --- a/src/hooks/inventory/useInventoryBadges.ts +++ b/src/hooks/inventory/useInventoryBadges.ts @@ -66,8 +66,8 @@ const useInventoryBadgesState = () => for(const newBadgeCode of newBadgeCodes) newBadgeIds.push(parser.getBadgeId(newBadgeCode)); - setBadgeCodes(newBadgeCodes); - setBadgeIds(newBadgeIds); + setBadgeCodes(prevValue => [ ...prevValue, ...newBadgeCodes ]); + setBadgeIds(prevValue => [ ...prevValue, ...newBadgeIds ]); setActiveBadgeCodes(parser.getActiveBadgeCodes()); });