From f16f9ada6403fade057e8ee10b2650ebe4610ef2 Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Fri, 3 Apr 2026 09:24:29 +0100 Subject: [PATCH] fix: resolve sidebar nav hydration mismatch and admin events 500 error Wrap auth-dependent sidebar navigation and meta in ClientOnly with SSR fallback slots to prevent hydration mismatch that caused all authenticated nav links to point to wrong pages. Fix admin events page crash by replacing empty string USelect values with 'all'. --- app/components/AppNavigation.vue | 180 +++++++++++++++++------------ app/components/ColorModeToggle.vue | 63 ++++++++++ app/pages/admin/events/index.vue | 18 +-- 3 files changed, 181 insertions(+), 80 deletions(-) create mode 100644 app/components/ColorModeToggle.vue diff --git a/app/components/AppNavigation.vue b/app/components/AppNavigation.vue index 070611b..6a82cd0 100644 --- a/app/components/AppNavigation.vue +++ b/app/components/AppNavigation.vue @@ -7,85 +7,123 @@ diff --git a/app/components/ColorModeToggle.vue b/app/components/ColorModeToggle.vue new file mode 100644 index 0000000..fc7b28d --- /dev/null +++ b/app/components/ColorModeToggle.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/app/pages/admin/events/index.vue b/app/pages/admin/events/index.vue index 2c23bde..e598956 100644 --- a/app/pages/admin/events/index.vue +++ b/app/pages/admin/events/index.vue @@ -23,7 +23,7 @@ { if (!events.value) return []; @@ -384,14 +384,14 @@ const filteredEvents = computed(() => { event.description.toLowerCase().includes(searchQuery.value.toLowerCase()); const matchesType = - !typeFilter.value || event.eventType === typeFilter.value; + typeFilter.value === "all" || event.eventType === typeFilter.value; const eventStatus = getEventStatus(event); const matchesStatus = - !statusFilter.value || eventStatus.toLowerCase() === statusFilter.value; + statusFilter.value === "all" || eventStatus.toLowerCase() === statusFilter.value; const matchesSeries = - !seriesFilter.value || + seriesFilter.value === "all" || (seriesFilter.value === "series-only" && event.series?.isSeriesEvent) || (seriesFilter.value === "standalone-only" && !event.series?.isSeriesEvent);