feat: start of stages

This commit is contained in:
TrèsAbhi committed 2025-12-13 23:35:38 -06:00
1 parent 036cc9915d
commit 67da59ef41
3 files changed
+87 -61

No files matched your search

@@ -1,7 +1,7 @@
import { times } from "lodash-es";
import { Suspense, useMemo } from "react";
import { api } from "../../../core/api/dynamic";
import { aggregateAttributes } from "../../../core/blitz/aggregateAttributes";
import { aggregateStages } from "../../../core/blitz/aggregateStages";
import { useAwait } from "../../../hooks/useAwait";
import { Tankopedia } from "../../../stores/tankopedia";
@@ -19,12 +19,7 @@ function Content({ id }: { id: string }) {
const stage = Tankopedia.use((state) => state.stage);
const attributes = useMemo(
() =>
aggregateAttributes(
tank.base_stats!.attributes,
tank.upgrade_stages.map((stage) => stage.attributes),
stage
),
() => aggregateStages(tank.base_stats!, tank.upgrade_stages, stage),
[stage]
);