From f13165e77d41a7c12c0e4376519c4c8ec09d0bfe Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Sat, 5 Apr 2025 15:09:15 -0500 Subject: [PATCH] feat: better ui --- .../src/components/MissingShellIcon.tsx | 2 +- .../TankSearch/components/FilterControl.tsx | 100 +++++++++++------- 2 files changed, 62 insertions(+), 40 deletions(-) diff --git a/packages/website/src/components/MissingShellIcon.tsx b/packages/website/src/components/MissingShellIcon.tsx index 686c4b492..e8df7963b 100644 --- a/packages/website/src/components/MissingShellIcon.tsx +++ b/packages/website/src/components/MissingShellIcon.tsx @@ -11,7 +11,7 @@ export function MissingShellIcon(props: ComponentProps<'svg'>) { {...props} > - - {Object.values(ShellType).map((shellType) => { - if (typeof shellType === 'string') return null; + + + {Object.values(ShellType).map((shellType) => { + if (typeof shellType === 'string') return null; - const selected = tankFilters.shells[index] === shellType; + const selected = tankFilters.shells[index] === shellType; - return ( - { - const mutated = [ - tankFilters.shells[0], - tankFilters.shells[1], - tankFilters.shells[2], - ] as TankFilters['shells']; + return ( + { + const mutated = [ + tankFilters.shells[0], + tankFilters.shells[1], + tankFilters.shells[2], + ] as TankFilters['shells']; - mutated[index] = selected ? null : shellType; + mutated[index] = selected ? null : shellType; - $tankFilters.setKey('shells', mutated); - }} - highContrast={selected} - color={selected ? undefined : 'gray'} - > - - - ); - })} - + $tankFilters.setKey('shells', mutated); + }} + highContrast={selected} + color={selected ? undefined : 'gray'} + > + + + ); + })} + + ); @@ -126,7 +132,6 @@ export function FilterControl({ compact }: FilterControlProps) { @@ -157,6 +162,15 @@ export function FilterControl({ compact }: FilterControlProps) { ); })} + + + {times(5, (index) => { const tier = index + 6; @@ -191,7 +205,6 @@ export function FilterControl({ compact }: FilterControlProps) { direction={compact ? 'row' : { initial: 'row', md: 'column' }} overflow="hidden" style={{ borderRadius: 'var(--radius-5)' }} - gap={{ initial: '0', md: '1' }} > {gameDefinitions.nations @@ -228,6 +241,15 @@ export function FilterControl({ compact }: FilterControlProps) { ); })} + + + {gameDefinitions.nations .slice(Math.ceil(gameDefinitions.nations.length / 2))