Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
tsx 25 lines 882 Bytes
Raw
1 import { getReferenceSource } from '@/lib/source';
2 import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3 import type { ReactNode } from 'react';
4 import { prepareTree } from '@/lib/filter-api-version';
5 import { buildSidebarNavIndex } from '@/lib/sidebar-nav-index';
6 import { SidebarAnalytics } from '@/components/sidebar-analytics';
7
8 export default async function Layout({ children }: { children: ReactNode }) {
9 const source = await getReferenceSource();
10 const tree = prepareTree(source.pageTree, '3.0');
11 const navIndex = buildSidebarNavIndex(tree);
12
13 return (
14 <DocsLayout
15 tree={tree}
16 nav={{ enabled: true, title: null }}
17 searchToggle={{ enabled: false }}
18 sidebar={{ collapsible: false, footer: null, tabs: false }}
19 themeSwitch={{ enabled: false }}
20 >
21 <SidebarAnalytics index={navIndex} />
22 {children}
23 </DocsLayout>
24 );
25 }