From acb52b988816c0616163b5aaafd1d1951d88c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:52:12 -0500 Subject: [PATCH] fix: no tech tree for non-researchable tanks --- .../src/components/Tankopedia/TechTreeSection/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx index 3822fac5d..45005bf13 100644 --- a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx +++ b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx @@ -14,9 +14,12 @@ const tankDefinitions = await fetchTankDefinitions(); export const XP_MULTIPLIERS = [1, 2, 3, 4, 5, 10]; export function TechTreeSection() { + const master = Duel.use((state) => state.protagonist.tank); + + if (master.type !== TankType.RESEARCHABLE) return null; + const xpMultiplier = TankopediaEphemeral.use((state) => state.xpMultiplier); const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation(); - const master = Duel.use((state) => state.protagonist.tank); const container = useRef(null); const lines = useMemo(() => { function extend(line: Line): Line[] {