From 954a9d4086057992bf1ebf0df7fd6a581673701f Mon Sep 17 00:00:00 2001 From: Aero56 Date: Sun, 22 Oct 2023 14:44:38 +0200 Subject: [PATCH] allow filtering groups on activity --- src/components/ActivitySelect.tsx | 6 ++-- src/hooks/queries/useGroupsQuery.ts | 24 +++++++++----- src/pages/Home.tsx | 49 +++++++++++++---------------- src/types/supabase.ts | 2 +- 4 files changed, 42 insertions(+), 39 deletions(-) diff --git a/src/components/ActivitySelect.tsx b/src/components/ActivitySelect.tsx index 698ace8..bc5d2d5 100644 --- a/src/components/ActivitySelect.tsx +++ b/src/components/ActivitySelect.tsx @@ -28,7 +28,7 @@ export const ACTIVITIES = [ ]; interface ActivitySelectProps { - value: Option; + value: Option | null; onChange: (value: Option) => void; className?: string; } @@ -38,7 +38,9 @@ const ActivitySelect = ({ onChange, className, }: ActivitySelectProps) => { - const [selected, setSelected] = useState