'use client'
import { useState, useCallback } from 'react'
import dynamic from 'next/dynamic'
import ContentHeader from './ContentHeader'
// Load sidebar only on the client — prevents SSR flash
const Sidebar = dynamic(() => import('./Sidebar'), {
ssr: false,
// Placeholder reserves the sidebar's space in the server HTML
// so page content never occupies the sidebar zone
loading: () => (
),
})
export default function DashboardShell({
siteId,
children,
}: {
siteId: string
children: React.ReactNode
}) {
const [mobileOpen, setMobileOpen] = useState(false)
const closeMobile = useCallback(() => setMobileOpen(false), [])
const openMobile = useCallback(() => setMobileOpen(true), [])
return (
{/* Content panel — rounded on all corners with slight inset to separate from sidebar */}
{children}
)
}