"use client"; import { useEffect, useRef } from "react"; import { usePathname } from "next/navigation"; import { Sidebar, SidebarProvider } from "../components/layout/Sidebar"; import { Topbar } from "../components/layout/Topbar"; function DashShell({ children }: { children: React.ReactNode }) { const contentRef = useRef(null); const pathname = usePathname(); useEffect(() => { const el = contentRef.current; if (!el) return; function applyPadding() { if (!el) return; const w = window.innerWidth; if (w >= 768 && w < 1024) { el.style.paddingInlineEnd = "72px"; } else { el.style.paddingInlineEnd = "0px"; } } applyPadding(); window.addEventListener("resize", applyPadding); return () => window.removeEventListener("resize", applyPadding); }, [pathname]); return (
{children}
); } export default function DashboardLayout({ children }: { children: React.ReactNode }) { return ( {children} ); }