diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 6ef9f70..de201cd 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -116,17 +116,12 @@ export async function fetchWeekend(meetingKey: number): Promise { } // fetchWeekendContext consumes the canonical /api/v1/weekend-context endpoint -// (sibling backend story #72). It resolves to null when the endpoint is not yet -// available (404 / server without the handler) so the Weekend page can fall back -// to client-side derivation from existing endpoints. Any other HTTP error throws. -export async function fetchWeekendContext(): Promise { - let res: Response - try { - res = await fetch('/api/v1/weekend-context') - } catch { - return null - } - if (res.status === 404) return null +// (backend story #72). The response is the authoritative WeekendContext shape and +// is used verbatim as the Weekend home's source of truth. Any HTTP error throws +// so the hook can surface an explicit error state; there is no client-side +// re-derivation of the contract. +export async function fetchWeekendContext(): Promise { + const res = await fetch('/api/v1/weekend-context') if (!res.ok) { throw new Error(`API ${res.status}: ${res.statusText}`) } diff --git a/frontend/src/components/Nav.tsx b/frontend/src/components/Nav.tsx index 0ef2d82..2946848 100644 --- a/frontend/src/components/Nav.tsx +++ b/frontend/src/components/Nav.tsx @@ -8,14 +8,23 @@ const PRIMARY = [ { to: '/explore', label: 'Explore', icon: Compass, exact: false }, ] as const +/** + * Nav renders one primary navigation system per breakpoint: + * - Desktop/tablet: the top bar's `aria-label="Primary"` links. + * - Mobile (≤640px): the bottom `aria-label="Primary"` bar; the top bar's links + * are hidden via CSS so the two are never both active at once. + * + * Admin is an operator utility, deliberately outside every Primary landmark — it + * lives in a plain toolbar slot and never appears in the mobile bottom nav. + */ export function Nav() { return ( <> - +
- + -