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 d083c5ed9..b9cfac388 100644 --- a/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx +++ b/src/app/tools/tankopedia/components/TankSearch/components/Options/index.tsx @@ -26,274 +26,110 @@ export function Options() { const filters = useTankopediaPersistent((state) => state.filters); return ( - - - - - - - - - - mutateTankopediaPersistent((draft) => { - draft.filters.test = value as TankopediaTestTankDisplay; - }) - } - > - - Include - - - Exclude - - Only - - - - - {TREE_TYPES.map((type, index) => ( - - ))} - - - {[...TANK_TYPES].map((type, index) => ( - - ))} - - - - {[...TIERS].slice(0, 5).map((tier, index) => ( - + + + + mutateTankopediaPersistent((draft) => { + draft.filters.test = value as TankopediaTestTankDisplay; + }) + } + > + + Include + + + Exclude + + Only + + + + + {TREE_TYPES.map((type, index) => ( + - ))} - - - {[...TIERS].slice(5).map((tier, index) => ( - - ))} - - - - - {nations.slice(0, 5).map((nation, index) => ( - - ))} - - - - {nations.slice(5).map((nation, index) => ( - - ))} - - + }) + } + > + + + ))} - - - - {[...TIERS].map((tier, index) => ( + + {[...TANK_TYPES].map((type, index) => ( + + ))} + + + + {[...TIERS].slice(0, 5).map((tier, index) => ( ))} - - {nations.map((nation, index) => ( + + {[...TIERS].slice(5).map((tier, index) => ( + + ))} + + + + + {nations.slice(0, 5).map((nation, index) => ( + ))} + + + + {nations.map((nation, index) => ( + + ))} + + + {[...TIERS].map((tier, index) => ( + + ))} ); diff --git a/src/app/tools/tankopedia/components/TankSearch/index.tsx b/src/app/tools/tankopedia/components/TankSearch/index.tsx index bf73c9634..24abef99c 100644 --- a/src/app/tools/tankopedia/components/TankSearch/index.tsx +++ b/src/app/tools/tankopedia/components/TankSearch/index.tsx @@ -1,5 +1,9 @@ import { slateDark } from '@radix-ui/colors'; -import { CaretDownIcon, MagnifyingGlassIcon } from '@radix-ui/react-icons'; +import { + CaretDownIcon, + MagnifyingGlassIcon, + TrashIcon, +} from '@radix-ui/react-icons'; import { Button, Card, @@ -10,7 +14,7 @@ import { TextField, } from '@radix-ui/themes'; import { go } from 'fuzzysort'; -import { Suspense, use, useEffect, useMemo, useRef, useState } from 'react'; +import { use, useEffect, useMemo, useRef, useState } from 'react'; import { TankType, TreeType } from '../../../../../components/Tanks'; import { asset } from '../../../../../core/blitzkrieg/asset'; import { @@ -202,13 +206,28 @@ export function TankSearch({ compact, onSelect = () => {} }: TankSearchProps) { + + - - Loading...}> - - - + {!compact && ( diff --git a/src/app/tools/tankopedia/page.tsx b/src/app/tools/tankopedia/page.tsx index 9a24570fc..8dd966b7a 100644 --- a/src/app/tools/tankopedia/page.tsx +++ b/src/app/tools/tankopedia/page.tsx @@ -8,7 +8,7 @@ export default function Page() { const router = useRouter(); return ( - + { router.push(`./tankopedia/${tank.id}`);