forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
33 lines (31 loc) · 1.13 KB
/
Copy pathlayout.tsx
File metadata and controls
33 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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>
</>
);
}