-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathindex.jsx
More file actions
45 lines (42 loc) · 1.37 KB
/
index.jsx
File metadata and controls
45 lines (42 loc) · 1.37 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
36
37
38
39
40
41
42
43
44
45
import TableOfContents from '@node-core/ui-components/Common/TableOfContents';
import Article from '@node-core/ui-components/Containers/Article';
import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from '@vercel/speed-insights/react';
import NavBar from '../Navigation';
import MetaBar from '../Metabar';
import SideBar from '../Sidebar';
import Footer from '../Footer';
import LocaleProvider from '../../providers/LocaleProvider';
/**
* @typedef {Object} Props
* @property {import('@node-core/doc-kit/src/generators/web/ui/types.d.ts').SerializedMetadata} metadata
* @property {Array} headings
* @property {string} readingTime
* @property {import('preact').ComponentChildren} children
*/
/**
* @param {Props} props
*/
export default ({ metadata, headings, readingTime, children }) => (
<LocaleProvider>
<Analytics basePath="/learn/_vercel" />
<SpeedInsights basePath="/learn/_vercel" />
<NavBar metadata={metadata} />
<Article>
<SideBar metadata={metadata} />
<div>
<div>
<TableOfContents headings={headings} summaryTitle="On this page" />
<br />
<main>{children}</main>
</div>
<MetaBar
metadata={metadata}
headings={headings}
readingTime={readingTime}
/>
</div>
</Article>
<Footer metadata={metadata} />
</LocaleProvider>
);