mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: move tankopedia to tankDefinitions
This commit is contained in:
1 parent
cfe71e15a4
commit
ad0fc69596
25 files changed
+270
-295
No files matched your search
@@ -15,7 +15,7 @@ import {
|
||||
NATIONS,
|
||||
TIERS,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
} from '../../../../core/blitzkrieg/tankopedia';
|
||||
} from '../../../../core/blitzkrieg/definitions/tanks';
|
||||
import mutateTankopedia, {
|
||||
TankopediaSortBy,
|
||||
TankopediaSortDirection,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { CaretLeftIcon, CaretRightIcon } from '@radix-ui/react-icons';
|
||||
import { Button, Flex, TextField } from '@radix-ui/themes';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { BlitzkriegTankopediaEntry } from '../../../../core/blitzkrieg/tankopedia';
|
||||
import { TankDefinition } from '../../../../core/blitzkrieg/definitions/tanks';
|
||||
|
||||
interface PageTurnerProps {
|
||||
page: number;
|
||||
setPage: (page: number) => void;
|
||||
searchedList: BlitzkriegTankopediaEntry[];
|
||||
searchedList: TankDefinition[];
|
||||
tanksPerPage: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ import { go } from 'fuzzysort';
|
||||
import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import PageWrapper from '../../../components/PageWrapper';
|
||||
import { asset } from '../../../core/blitzkrieg/asset';
|
||||
import { tankIcon } from '../../../core/blitzkrieg/tankIcon';
|
||||
import {
|
||||
BlitzkriegTankopediaEntry,
|
||||
TANK_ICONS,
|
||||
TANK_ICONS_COLLECTOR,
|
||||
TANK_ICONS_PREMIUM,
|
||||
TIER_ROMAN_NUMERALS,
|
||||
tanks,
|
||||
} from '../../../core/blitzkrieg/tankopedia';
|
||||
TankDefinition,
|
||||
tanksDefinitionsArray,
|
||||
} from '../../../core/blitzkrieg/definitions/tanks';
|
||||
import { tankIcon } from '../../../core/blitzkrieg/tankIcon';
|
||||
import { theme } from '../../../stitches.config';
|
||||
import { useTankopedia } from '../../../stores/tankopedia';
|
||||
import { Options } from './components/Options';
|
||||
@@ -26,7 +26,7 @@ const TANKS_PER_PAGE = 3 * 2 ** 4;
|
||||
|
||||
export default function Page() {
|
||||
const tankopediaState = useTankopedia();
|
||||
const awaitedTanks = use(tanks);
|
||||
const awaitedTanks = use(tanksDefinitionsArray);
|
||||
const input = useRef<HTMLInputElement>(null);
|
||||
const searchableTanks = useMemo(
|
||||
() =>
|
||||
@@ -102,7 +102,7 @@ export default function Page() {
|
||||
'name',
|
||||
'name_short',
|
||||
'id',
|
||||
] satisfies (keyof BlitzkriegTankopediaEntry)[],
|
||||
] satisfies (keyof TankDefinition)[],
|
||||
}).map(({ obj }) => obj),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user