From fadf1b57c9da74ecc4cee09bc6f5aef39e8d8c80 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 3 Aug 2025 00:49:59 +0200 Subject: [PATCH] Move filters --- app/profiles/ProfileFilters.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/profiles/ProfileFilters.tsx b/app/profiles/ProfileFilters.tsx index fae50e4e..ba2acd83 100644 --- a/app/profiles/ProfileFilters.tsx +++ b/app/profiles/ProfileFilters.tsx @@ -216,7 +216,14 @@ export function ProfileFilters({filters, onFilterChange, onShowFilters, onToggle ) } - function getSlider(id: RangeKey, name: string, min: number, max: number) { + interface Range { + id: RangeKey; + name: string; + min: number; + max: number; + } + + function getSlider({id, name, min, max}: Range) { const minStr = 'min' + capitalize(id); const maxStr = 'max' + capitalize(id); const [minVal, setMinVal] = useState(undefined); @@ -372,8 +379,9 @@ export function ProfileFilters({filters, onFilterChange, onShowFilters, onToggle - {rangeConfig.map(({id, name, min, max}) => getSlider(id, name, min, max))} + {getSlider(rangeConfig[0])} {dropdownConfig.map(({id, name}) => getDrowDown(id, name))} + {getSlider(rangeConfig[1])} {/*
*/} {/* */}