mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 12:46:11 +01:00
feat: start of stages
This commit is contained in:
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]
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user