From e3bb654cbc081db2b0900269ac8e6f1ad55eaad4 Mon Sep 17 00:00:00 2001 From: Zaine Date: Fri, 26 Jun 2026 09:45:10 +0100 Subject: [PATCH] make the catchup card collapsable --- .../src/components/features/catch-up-card.tsx | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/apps/web/src/components/features/catch-up-card.tsx b/apps/web/src/components/features/catch-up-card.tsx index 99c2912..202fc6c 100644 --- a/apps/web/src/components/features/catch-up-card.tsx +++ b/apps/web/src/components/features/catch-up-card.tsx @@ -1,5 +1,6 @@ "use client"; +import { useState } from "react"; import { formatDisplayDate } from "@/lib/dates-client"; type Gap = { date: string; reason: string }; @@ -16,27 +17,38 @@ const REASON_LABEL: Record = { }; export function CatchUpCard({ gaps, onSelectDate }: CatchUpCardProps) { + const [open, setOpen] = useState(false); + if (gaps.length === 0) return null; return (
-
Catch up gently
-
-

- A few recent days could use a note — no pressure, just pick one if you like. -

- {gaps.map((g) => ( - - ))} -
+ + {open && ( +
+

+ A few recent days could use a note — no pressure, just pick one if you like. +

+ {gaps.map((g) => ( + + ))} +
+ )}
); }