forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultLayout.tsx
More file actions
35 lines (30 loc) · 1.06 KB
/
DefaultLayout.tsx
File metadata and controls
35 lines (30 loc) · 1.06 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
34
35
import Head from 'next/head'
// import { Sidebar } from 'components/Sidebar'
import { Header } from 'components/Header'
import { SmallFooter } from 'components/SmallFooter'
import { ScrollButton } from 'components/ScrollButton'
import { SupportSection } from 'components/SupportSection'
import { DeprecationBanner } from 'components/DeprecationBanner'
import { useMainContext } from 'components/context/MainContext'
type Props = { children?: React.ReactNode }
export const DefaultLayout = (props: Props) => {
const { builtAssets, expose } = useMainContext()
return (
<div className="d-lg-flex">
<Head>
<link rel="stylesheet" href={builtAssets.main.css} />
<script id="expose" type="application/json" dangerouslySetInnerHTML={{ __html: expose }} />
<script src={builtAssets.main.js} />
</Head>
{/* <Sidebar /> */}
<main className="width-full">
<Header />
<DeprecationBanner />
{props.children}
<SupportSection />
<SmallFooter />
<ScrollButton />
</main>
</div>
)
}