From c087202bb4495a44e435262f2195819e4a15e0a6 Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 17 Jun 2026 19:28:04 -0600 Subject: [PATCH] fix(admin): AdminShell needs "use client" (calls useMediaQuery hook) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Production error digest 4233228922: `An error occurred in the Server Components render` on /admin/* — AdminShell was implicitly a server component but called the useMediaQuery() client hook from its body, throwing at render time. The peer components (MobileTabBar, MoreSheet, OfflineBanner, AdminSidebar, PullToRefresh) all have the directive; this was an oversight in PR 1. Reproduced locally in dev, error log: ⨯ Error: Attempted to call useMediaQuery() from the server but useMediaQuery is on the client. at AdminShell (src/components/admin/AdminShell.tsx:17:34) Fix: add "use client" directive at the top of AdminShell.tsx. --- src/components/admin/AdminShell.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/admin/AdminShell.tsx b/src/components/admin/AdminShell.tsx index e4f2c61..312c91d 100644 --- a/src/components/admin/AdminShell.tsx +++ b/src/components/admin/AdminShell.tsx @@ -1,3 +1,5 @@ +"use client"; + import { ReactNode } from "react"; import AdminSidebar from "@/components/admin/AdminSidebar"; import MobileTabBar from "@/components/admin/MobileTabBar";