mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-19 20:03:51 +01:00
simplify compatibility logic
This commit is contained in:
1 parent
2627aba938
commit
17264c1adc
2 files changed
+39
-55
No files matched your search
@@ -55,12 +55,11 @@ function Consumables() {
|
||||
const consumables = useConsumables();
|
||||
const tierPrices = useTierPrices();
|
||||
const tank = useProtagonist();
|
||||
const isCompatible = useCompatibility();
|
||||
const isCompatible = useCompatibility(tank);
|
||||
|
||||
return Object.values(consumables.consumables).map(
|
||||
({ compatibility, consumable }) => {
|
||||
if (!isCompatible(compatibility!, tank)) return null;
|
||||
|
||||
if (!isCompatible(compatibility!)) return null;
|
||||
return <span>{consumable!.name_key}</span>;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user