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

Function Layout

src/components/Layout.tsx:10–38  ·  view source on GitHub ↗
({
  children,
  allSections,
}: {
  children: React.ReactNode
  allSections: Record<string, Array<Section>>
})

Source from the content-addressed store, hash-verified

8import { usePathname } from 'next/navigation'
9
10export function Layout({
11 children,
12 allSections,
13}: {
14 children: React.ReactNode
15 allSections: Record<string, Array<Section>>
16}) {
17 let pathname = usePathname()
18
19 return (
20 <SectionProvider sections={allSections[pathname] ?? []}>
21 <div className="h-full lg:ml-72 xl:ml-80">
22 <motion.header
23 layoutScroll
24 className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
25 >
26 <div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-zinc-900/10 lg:px-6 lg:pb-8 lg:pt-4 xl:w-80 lg:dark:border-white/10">
27 <Header />
28 <Navigation className="hidden lg:mt-[4rem] lg:block" />
29 </div>
30 </motion.header>
31 <div className="relative flex max-h-full min-h-screen flex-col px-4 pt-14 sm:px-6 lg:px-8">
32 <main className="flex-auto">{children}</main>
33 <Footer />
34 </div>
35 </div>
36 </SectionProvider>
37 )
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected