/* ═══════════════════════════════════════════════════════════════ ADMIN PAGE WIDTH The admin column is max-w-5xl. The record editor wants more: its section nav sits to the left of a form that keeps that width. Like the title (adminTitle.tsx), the page asks and the layout decides, so AdminLayout stays the one place that sets
's width. Clears on unmount, so leaving the editor puts the list pages back to their usual width. ═══════════════════════════════════════════════════════════════ */ import { createContext, useContext, useEffect } from "react"; export const AdminWidthContext = createContext<((wide: boolean) => void) | null>(null); export function useWideAdminPage() { const setWide = useContext(AdminWidthContext); useEffect(() => { if (!setWide) return undefined; setWide(true); return () => setWide(false); }, [setWide]); }