mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { DocsLayout } from "fumadocs-ui/layouts/docs";
|
|
import { HomeLayout } from "fumadocs-ui/layouts/home";
|
|
import type { ReactNode } from "react";
|
|
import { baseOptions } from "../layout.config";
|
|
import { source } from "@/app/source";
|
|
import IntegrationsSidebar from "@/components/layout/integrations-sidebar";
|
|
import Navbar from "@/components/layout/navbar";
|
|
import { ScrollReset } from "@/components/layout/scroll-reset";
|
|
import { patchPageTree } from "@/lib/patch-pagetree";
|
|
|
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
const patchedPageTree = patchPageTree(source.pageTree);
|
|
|
|
return (
|
|
<>
|
|
<Navbar pageTree={patchedPageTree} />
|
|
<HomeLayout {...baseOptions} nav={{ enabled: false }}>
|
|
<IntegrationsSidebar pageTree={patchedPageTree} />
|
|
<div className="docs-content-wrapper">
|
|
<ScrollReset />
|
|
<DocsLayout
|
|
tree={patchedPageTree}
|
|
searchToggle={{ enabled: false }}
|
|
nav={{ enabled: false }}
|
|
sidebar={{ enabled: false }}
|
|
>
|
|
{children}
|
|
</DocsLayout>
|
|
</div>
|
|
</HomeLayout>
|
|
</>
|
|
);
|
|
}
|