From 48578407db0984098561fa3ef821e926b65b2d10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Fri, 1 Dec 2023 12:36:31 -0600
Subject: [PATCH] feat: icons
---
.../tankopedia/components/List/index.tsx | 61 +++++++++++++------
src/core/blitzkrieg/tankopedia.ts | 6 +-
2 files changed, 45 insertions(+), 22 deletions(-)
diff --git a/src/app/tools/tankopedia/components/List/index.tsx b/src/app/tools/tankopedia/components/List/index.tsx
index 2919b7e37..0f83a9695 100644
--- a/src/app/tools/tankopedia/components/List/index.tsx
+++ b/src/app/tools/tankopedia/components/List/index.tsx
@@ -6,7 +6,12 @@ import { Card, Flex, Inset, Text, TextField } from '@radix-ui/themes';
import { use, useRef } from 'react';
import { Search } from 'react-fuzzysort';
import { tankIcon } from '../../../../../core/blitzkrieg/tankIcon';
-import { tanks } from '../../../../../core/blitzkrieg/tankopedia';
+import {
+ TANK_ICONS,
+ TANK_ICONS_COLLECTOR,
+ TANK_ICONS_PREMIUM,
+ tanks,
+} from '../../../../../core/blitzkrieg/tankopedia';
import { theme } from '../../../../../stitches.config';
import * as styles from './index.css';
@@ -64,31 +69,49 @@ export function List() {
}}
/>
-
- {tank.name_short ??
- tank.name ??
- `Unknown tank ${tank.id}`}
-
+
+
+ {tank.name_short ??
+ tank.name ??
+ `Unknown tank ${tank.id}`}
+
+
diff --git a/src/core/blitzkrieg/tankopedia.ts b/src/core/blitzkrieg/tankopedia.ts
index 96260cdca..dee09b571 100644
--- a/src/core/blitzkrieg/tankopedia.ts
+++ b/src/core/blitzkrieg/tankopedia.ts
@@ -61,21 +61,21 @@ export const tankNamesDiacritics = tankNames.then((tankNames) =>
),
);
-export const TANK_ICONS: Record = {
+export const TANK_ICONS: Record = {
'AT-SPG': 'https://i.imgur.com/BIHSEH0.png',
lightTank: 'https://i.imgur.com/CSNha5V.png',
mediumTank: 'https://i.imgur.com/wvf3ltm.png',
heavyTank: 'https://i.imgur.com/ECeqlZa.png',
};
-export const TANK_ICONS_PREMIUM: Record = {
+export const TANK_ICONS_PREMIUM: Record = {
'AT-SPG': 'https://i.imgur.com/TCu3EdR.png',
lightTank: 'https://i.imgur.com/zdkpTRb.png',
mediumTank: 'https://i.imgur.com/3z7eHX6.png',
heavyTank: 'https://i.imgur.com/P3vbmyA.png',
};
-export const TANK_ICONS_COLLECTOR: Record = {
+export const TANK_ICONS_COLLECTOR: Record = {
'AT-SPG': 'https://i.imgur.com/WTjeirB.png',
lightTank: 'https://i.imgur.com/EwhtKkU.png',
mediumTank: 'https://i.imgur.com/u8YDMBh.png',