The Node.js® Website
1import type { FC, PropsWithChildren } from 'react';
2
3import WithDownloadCategories from '@/components/withDownloadCategories';
4import WithFooter from '@/components/withFooter';
5import WithNavBar from '@/components/withNavBar';
6import { useClientContext } from '@/hooks/react-server';
7
8import styles from './layouts.module.css';
9
10const DownloadLayout: FC<PropsWithChildren> = async ({ children }) => {
11 const {
12 frontmatter: { title, subtitle },
13 } = useClientContext();
14
15 return (
16 <>
17 <WithNavBar />
18
19 <div className={styles.downloadLayout}>
20 <main>
21 <h1>{title}</h1>
22
23 <p>{subtitle}</p>
24
25 <WithDownloadCategories>{children}</WithDownloadCategories>
26 </main>
27 </div>
28
29 <WithFooter />
30 </>
31 );
32};
33
34export default DownloadLayout;