MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / RootLayout

Function RootLayout

src/app/(docs)/layout.tsx:6–27  ·  view source on GitHub ↗
({
  children,
}: {
  children: React.ReactNode
})

Source from the content-addressed store, hash-verified

4import '@/styles/tailwind.css'
5
6export default async function RootLayout({
7 children,
8}: {
9 children: React.ReactNode
10}) {
11 let pages = await glob('/(docs)/**/*.mdx', { cwd: 'src/app' })
12 let allSectionsEntries = (await Promise.all(
13 pages.map(async (filename) => [
14 '/' + filename.replace(/(^|\/)page\.mdx$/, ''),
15 (await import(`./${filename}`)).sections,
16 ]),
17 )) as Array<[string, Array<Section>]>
18 let allSections = Object.fromEntries(allSectionsEntries)
19
20 return (
21 <div className="flex min-h-full w-full bg-white antialiased dark:bg-zinc-900">
22 <div className="w-full">
23 <Layout allSections={allSections}>{children}</Layout>
24 </div>
25 </div>
26 )
27}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected