fix: find att0 correctly

This commit is contained in:
TrèsAbhi committed 2025-12-18 13:16:20 -06:00
1 parent 6ba6e10108
commit 0e0f4fbe9f
2 files changed
+17 -14

No files matched your search

@@ -17,33 +17,33 @@ function Content({ id }: { id: string }) {
const tank = useAwait(() => api.tank(id), `tank-${id}`);
const stage = Tankopedia.use((state) => state.stage);
const aggregatedStages = useMemo(
const parameters = useMemo(
() => aggregateStages(tank.base_stats!, tank.upgrade_stages, stage),
[stage]
);
return (
<>
<pre children={JSON.stringify(tank, null, 2)} />
<h1>{tank.name?.value}</h1>
<h2>Characteristics</h2>
<div style={{ display: "flex" }}>
{times(tank.upgrade_stages.length, (index) => (
<button
key={index}
onClick={() => {
Tankopedia.mutate((draft) => {
draft.stage = index;
});
}}
>
Stage {index + 1} {index === stage && "(selected)"}
Stage {index} {index === stage && "(selected)"}
</button>
))}
</div>
<pre children={JSON.stringify(parameters, null, 2)} />
<h1>{tank.name?.value}</h1>
<h2>Characteristics</h2>
{/* {_characteristicsOrder.map((group) => (
<>
<h2>{CharacteristicsGroup[group.group]}</h2>