From 7225fb0231c23a2ee1d976fae71e15c21f4b8841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:34:27 -0500 Subject: [PATCH] feat: data driven nations --- .../TankSearch/components/Options/index.tsx | 35 +++++++++++++------ .../components/TankSearch/index.tsx | 7 ++-- src/commands/ownedTanks.tsx | 7 ++-- src/commands/today.ts | 7 ++-- src/core/blitzkit/tankDefinitions/index.ts | 12 ------- src/core/discord/addPeriodicFilterOptions.ts | 7 ++-- 6 files changed, 40 insertions(+), 35 deletions(-) diff --git a/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx b/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx index 71b91e48a..5f1ca2000 100644 --- a/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx +++ b/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx @@ -11,7 +11,7 @@ import { TREE_TYPE_ICONS, TREE_TYPE_IMAGES, } from '../../../../../../../components/Tanks/components/Item/constants'; -import { NATIONS } from '../../../../../../../core/blitzkit/tankDefinitions'; +import { gameDefinitions } from '../../../../../../../core/blitzkit/gameDefinitions'; import { TIERS, TIER_ROMAN_NUMERALS, @@ -23,7 +23,7 @@ import mutateTankopediaPersistent, { import * as styles from './index.css'; export function Options() { - const nations = use(NATIONS); + const awaitedGameDefinitions = use(gameDefinitions); const filters = useTankopediaPersistent((state) => state.filters); return ( @@ -65,7 +65,7 @@ export function Options() { ))} - {nations.map((nation, index) => ( + {awaitedGameDefinitions.nations.map((nation, index) => (