mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-19 20:03:51 +01:00
some equipment groundwork
This commit is contained in:
1 parent
d3ab4bac51
commit
a2574efb9c
10 files changed
+105
-1
No files matched your search
@@ -19,11 +19,14 @@ import {
|
||||
maxModulesPerRow,
|
||||
originalLineName,
|
||||
} from "../../config/modules";
|
||||
import { useConsumables } from "../../hooks/useConsumables";
|
||||
import { useEquipment } from "../../hooks/useEquipment";
|
||||
import { useProtagonist } from "../../hooks/useProtagonist";
|
||||
import { useStrings } from "../../hooks/useStrings";
|
||||
import { useTierPrices } from "../../hooks/useTierPrices";
|
||||
import { useUpgradePreset } from "../../hooks/useUpgradePreset";
|
||||
import { Tankopedia } from "../../stores/tankopedia";
|
||||
import { isCompatible } from "../../tankopedia/isCompatible";
|
||||
import { Button } from "../Button";
|
||||
import { Heading } from "../Heading";
|
||||
import { Link } from "../Link";
|
||||
@@ -43,10 +46,24 @@ export function TankopediaLoadout() {
|
||||
<Section>
|
||||
{showModules && <Modules />}
|
||||
<Equipment />
|
||||
<Consumables />
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
function Consumables() {
|
||||
const consumables = useConsumables();
|
||||
const tierPrices = useTierPrices();
|
||||
|
||||
return Object.values(consumables.consumables).map(
|
||||
({ compatibility, consumable }) => {
|
||||
if (!isCompatible(compatibility!)) return null;
|
||||
|
||||
return <span>{consumable!.name_key}</span>;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function Equipment() {
|
||||
const strings = useStrings();
|
||||
const tank = useProtagonist();
|
||||
|
||||
Reference in new issue
Block a user