From 81b986f13e8006311e45065635a9e981f72b9f36 Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Sat, 31 Oct 2026 12:36:10 +0000 Subject: [PATCH 1/5] Tidy the club header and fold away joining by code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the club page, Manage moves up beside "← Clubs", so the logo and name line up and the name has room for one line. On the clubs list, "Join with a code" becomes a small link unless you have no clubs yet, since most people join through an invite link. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/club.tsx | 28 ++++++++++++++-------------- apps/web/src/pages/clubs.tsx | 22 +++++++++++++++++++--- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/apps/web/src/pages/club.tsx b/apps/web/src/pages/club.tsx index 2cbab5e..5b6de59 100644 --- a/apps/web/src/pages/club.tsx +++ b/apps/web/src/pages/club.tsx @@ -52,28 +52,28 @@ export function ClubPage() { return ( <>
- - ← Clubs - -
-
- -
-

{c.name}

-

- {c.memberCount} {c.memberCount === 1 ? 'member' : 'members'} -

-
-
+
+ + ← Clubs + {manage && ( Manage )}
+
+ +
+

{c.name}

+

+ {c.memberCount} {c.memberCount === 1 ? 'member' : 'members'} +

+
+
{c.description && (

{c.description} diff --git a/apps/web/src/pages/clubs.tsx b/apps/web/src/pages/clubs.tsx index a816044..a8aeb4a 100644 --- a/apps/web/src/pages/clubs.tsx +++ b/apps/web/src/pages/clubs.tsx @@ -45,7 +45,7 @@ export function ClubsPage() { ) : null} - + ); } @@ -166,9 +166,14 @@ function CreateClub({ onCancel }: { onCancel: () => void }) { ); } -function JoinWithCode() { +/** + * Most people arrive by invite link, so the code form stays folded away unless + * they have no clubs yet. Codes are for reading out at the start of a run. + */ +function JoinWithCode({ open: startOpen }: { open: boolean }) { const join = useJoinClub(); const navigate = useNavigate(); + const [open, setOpen] = useState(false); const onSubmit = (e: FormEvent) => { e.preventDefault(); const code = String(new FormData(e.currentTarget).get('code')); @@ -178,6 +183,16 @@ function JoinWithCode() { }, }); }; + if (!open && !startOpen) { + return ( + + ); + } return (

+ );