Skip to content

Commit e29d178

Browse files
author
Brijesh Bittu
committed
Add id attribute to content
1 parent 846daf3 commit e29d178

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

docs/src/app/(public)/(content)/[contentDir]/[slug]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ export default async function GettingStarted({
99
params: Promise<{ slug: string; contentDir: string }>;
1010
}) {
1111
const { contentDir, slug } = await params;
12-
return <ContentPage basePath={contentDir} slug={slug} />;
12+
return (
13+
<div id="main-content">
14+
<ContentPage basePath={contentDir} slug={slug} />
15+
</div>
16+
);
1317
}
1418

1519
export function generateStaticParams() {

docs/src/components/ContentPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as React from 'react';
12
import { notFound } from 'next/navigation';
23

34
import { useMDXComponents } from 'docs/mdx-components';
@@ -12,13 +13,13 @@ export default async function ContentPage({ basePath, slug }: { basePath: string
1213
}
1314
const { MdxContent, githubFilePath } = result;
1415
return (
15-
<div>
16+
<React.Fragment>
1617
<MdxContent components={components} />
1718
<div style={{ display: 'flex', justifyContent: 'flex-end', fontSize: '0.8rem' }}>
1819
<Link href={githubFilePath} target="_blank" rel="noopener noreferrer">
1920
Edit on GitHub
2021
</Link>
2122
</div>
22-
</div>
23+
</React.Fragment>
2324
);
2425
}

0 commit comments

Comments
 (0)