From 96ca7651abf91be7b1125eab84db1856476f50de Mon Sep 17 00:00:00 2001 From: Timothy Armes Date: Sun, 14 Apr 2024 15:44:47 +0200 Subject: [PATCH] Reformat filters --- .../(main)/tournaments/TournamentTable.tsx | 16 ++++++++++------ src/components/SearchBar.tsx | 14 +++++++++++--- src/components/form/Select.tsx | 6 +++--- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/app/[locale]/(main)/tournaments/TournamentTable.tsx b/src/app/[locale]/(main)/tournaments/TournamentTable.tsx index 7b8ac13..e8ecdf4 100644 --- a/src/app/[locale]/(main)/tournaments/TournamentTable.tsx +++ b/src/app/[locale]/(main)/tournaments/TournamentTable.tsx @@ -18,11 +18,9 @@ import { filteredTournamentsListAtom, hoveredMapIdAtom, normsOnlyAtom, - regionFilterAtom, } from "@/atoms"; import { RegionSelect } from "@/components/RegionSelect"; import SearchBar from "@/components/SearchBar"; -import { Select } from "@/components/form/Select"; import { useBreakpoint } from "@/hooks/tailwind"; import useDatePickerWidth from "@/hooks/useDatePickerWidth"; import { DatePickerDirection } from "@/types"; @@ -80,14 +78,22 @@ const TournamentTable = () => { id="listing" >
- +
+ + "flex flex-1", + }} + /> +
-
+
diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx index 6d121d2..77d4f05 100644 --- a/src/components/SearchBar.tsx +++ b/src/components/SearchBar.tsx @@ -3,10 +3,15 @@ import { useTransition } from "react"; import { useAtom } from "jotai/index"; import { useTranslations } from "next-intl"; import { IoCloseOutline } from "react-icons/io5"; +import { twMerge } from "tailwind-merge"; import { searchStringAtom } from "@/atoms"; -const SearchBar = () => { +type SearchBarProps = { + className?: string; +}; + +const SearchBar = ({ className }: SearchBarProps) => { const t = useTranslations("Tournaments"); const [searchString, setSearchString] = useAtom(searchStringAtom); const [isPending, startTransition] = useTransition(); @@ -22,7 +27,7 @@ const SearchBar = () => { -
+
{