mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-13 00:02:43 +00:00
20 lines
654 B
TypeScript
20 lines
654 B
TypeScript
import { source } from '@/lib/source';
|
|
import { DocsLayout } from 'fumadocs-ui/layouts/notebook';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
import { SectionSwitcher } from '@/components/shared/section-switcher';
|
|
import { SidebarScrollKeeper } from '@/components/shared/sidebar-scroll-keeper';
|
|
|
|
export default function Layout({ children }: LayoutProps<'/[...slug]'>) {
|
|
return (
|
|
<DocsLayout
|
|
tree={source.getPageTree()}
|
|
{...baseOptions()}
|
|
nav={{ ...baseOptions().nav, mode: 'top', children: <SectionSwitcher /> }}
|
|
sidebar={{ tabs: false }}
|
|
>
|
|
<SidebarScrollKeeper />
|
|
{children}
|
|
</DocsLayout>
|
|
);
|
|
}
|