import { PostComments } from '@/app/(main)/(home)/posts/[slug]/page.client'; import type { TOCItemType } from 'fumadocs-core/server'; import { InlineTOC } from 'fumadocs-ui/components/inline-toc'; import type { ReactNode } from 'react'; import { Section } from './section'; interface MdxLayoutProps { children: ReactNode; title: string; toc?: TOCItemType[] | null; comments?: boolean; slug: string; } export default function MdxLayout({ children, title, toc, comments, slug, }: MdxLayoutProps): ReactNode { return ( <>

{title}

{toc?.length ? ( ) : null}
{children}
{comments ? ( ) : null}
); }