"use client"; import { isFullBleedMainRoute } from "@/app/(main)/isFullBleedMainRoute"; import { usePathname } from "next/navigation"; import type { ReactNode } from "react"; type MainLayoutBodyProps = { appBar: ReactNode; mainContent: ReactNode; }; /** * On `/po/workbench`, wraps the AppBar and main in a `100dvh` flex column so `
` can * use `flex: 1` instead of `calc(100dvh - 56/64px)` (which misses the real AppBar height). */ export default function MainLayoutBody({ appBar, mainContent, }: MainLayoutBodyProps) { const pathname = usePathname(); const isWorkbench = isFullBleedMainRoute(pathname); if (isWorkbench) { return (
{appBar}
{mainContent}
); } return ( <> {appBar} {mainContent} ); }