18 lines
506 B
TypeScript
18 lines
506 B
TypeScript
import { source } from '@/lib/source';
|
|
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
|
|
import { baseOptions } from '@/lib/layout.shared';
|
|
import type { ReactNode } from 'react';
|
|
|
|
// DocsLayout (sidebar + nav) for prefixed-locale docs pages.
|
|
export default async function Layout({
|
|
children,
|
|
params,
|
|
}: LayoutProps<'/[lang]/[...slug]'>) {
|
|
const { lang } = await params;
|
|
return (
|
|
<DocsLayout tree={source.getPageTree(lang)} {...baseOptions(lang)}>
|
|
{children}
|
|
</DocsLayout>
|
|
);
|
|
}
|