From d07e8af88d76ca2663c79f97cd6a56dca1d6d4fd Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Fri, 5 Jun 2026 15:21:58 -0400 Subject: [PATCH] fix(02): keep calendar mounted on empty windows so navigation survives Navigation now lives in Schedule-X's built-in header; replacing the calendar with EmptyState on a zero-event day removed the nav and stranded the user. Always render the calendar (empty grid is self-explanatory). --- apps/pwa/src/components/CalendarShell.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/pwa/src/components/CalendarShell.tsx b/apps/pwa/src/components/CalendarShell.tsx index c3c5f43..b8fa463 100644 --- a/apps/pwa/src/components/CalendarShell.tsx +++ b/apps/pwa/src/components/CalendarShell.tsx @@ -48,7 +48,6 @@ import { EventDetailPopover } from './EventDetailPopover.js' import { AppNav } from './AppNav.js' import { ColorLegend } from './ColorLegend.js' import { SkeletonCalendar } from './SkeletonCalendar.js' -import { EmptyState } from './EmptyState.js' // ── Helpers ──────────────────────────────────────────────────────────────── @@ -163,11 +162,6 @@ export function CalendarShell() { // Determine which content to show in the calendar area const isInitialLoading = meQuery.isLoading || (eventsQuery.isLoading && !eventsQuery.data) const isEventsError = eventsQuery.isError - const isEmptyResult = - !isInitialLoading && - !isEventsError && - eventsQuery.isSuccess && - (eventsQuery.data?.occurrences.length ?? 0) === 0 const phone = isPhone() @@ -264,11 +258,11 @@ export function CalendarShell() { Retry - ) : isEmptyResult ? ( - // Empty state: zero events in this window - ) : ( - // Normal: Schedule-X calendar (primary focal point) + // Normal: Schedule-X calendar (primary focal point). + // ALWAYS render the calendar even when the window has no events — its built-in + // header carries the navigation, so swapping in an empty-state would strand the + // user with no way to navigate away from an empty day/week. An empty grid is clear. )}