From 5b5e204cce80e0043c0986420f400ff662ea0909 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Sat, 14 Dec 2024 13:43:57 -0600 Subject: [PATCH] fix: tank hot swapping no longer crashes --- .../src/components/Tankopedia/TechTreeSection/index.tsx | 3 --- packages/website/src/pages/tools/tankopedia/[id]/_index.tsx | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx index b0a19c556..b8ca173c9 100644 --- a/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx +++ b/packages/website/src/components/Tankopedia/TechTreeSection/index.tsx @@ -17,9 +17,6 @@ export const XP_MULTIPLIERS = [1, 2, 3, 4, 5, 10]; export function TechTreeSection({ skeleton }: MaybeSkeletonComponentProps) { const master = Duel.use((state) => state.protagonist.tank); - - if (master.type !== TankType.RESEARCHABLE || master.deprecated) return null; - const xpMultiplier = TankopediaEphemeral.use((state) => state.xpMultiplier); const mutateTankopediaEphemeral = TankopediaEphemeral.useMutation(); const container = useRef(null); diff --git a/packages/website/src/pages/tools/tankopedia/[id]/_index.tsx b/packages/website/src/pages/tools/tankopedia/[id]/_index.tsx index ea1be49f3..6d0a1c997 100644 --- a/packages/website/src/pages/tools/tankopedia/[id]/_index.tsx +++ b/packages/website/src/pages/tools/tankopedia/[id]/_index.tsx @@ -1,3 +1,4 @@ +import { TankType } from '@blitzkit/core'; import { PageWrapper } from '../../../../components/PageWrapper'; import { CalloutsSection } from '../../../../components/Tankopedia/CalloutsSection'; import { CharacteristicsSection } from '../../../../components/Tankopedia/CharacteristicsSection'; @@ -42,7 +43,9 @@ export function Page({ id, skeleton }: PageProps) { - + {tank.type === TankType.RESEARCHABLE && !tank.deprecated && ( + + )}