Skip to content

Commit 7b99562

Browse files
authored
fix: remove Suspense wrapper and DocsSkeleton from RenderDocs component (#513)
Removes an unnecessary Suspense wrapper that was causing the page to return empty docs content without JS enabled, affecting crawlers. Because the pages are statically rendered the Suspense boundary is not needed.
1 parent 609b134 commit 7b99562

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

src/components/RenderDocs/index.tsx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { fetchRelatedThreads } from '@data'
1818
import { ArrowIcon } from '@icons/ArrowIcon/index'
1919
import { unstable_cache } from 'next/cache'
2020
import Link from 'next/link'
21-
import React, { Suspense } from 'react'
21+
import React from 'react'
2222

2323
import classes from './index.module.scss'
2424

@@ -138,13 +138,11 @@ export const RenderDocs = async ({
138138
/>
139139
<div aria-hidden className={classes.navOverlay} />
140140
<main className={['cols-8 start-5 cols-m-8 start-m-1', classes.content].join(' ')}>
141-
<Suspense fallback={<DocsSkeleton />}>
142-
{children}
143-
<h1 className={classes.title}>{currentDoc.title}</h1>
144-
<div className={classes.mdx}>
145-
<RichTextWithTOC content={currentDoc.content} />
146-
</div>
147-
</Suspense>
141+
{children}
142+
<h1 className={classes.title}>{currentDoc.title}</h1>
143+
<div className={classes.mdx}>
144+
<RichTextWithTOC content={currentDoc.content} />
145+
</div>
148146
<div className={classes.feedbackMobile}>
149147
<DocsFeedback path={path} />
150148
</div>
@@ -188,10 +186,3 @@ export const RenderDocs = async ({
188186
</Gutter>
189187
)
190188
}
191-
192-
const DocsSkeleton = () => (
193-
<div className={classes.skeleton}>
194-
<div className={classes.skeletonTitle} />
195-
<div className={classes.skeletonContent} />
196-
</div>
197-
)

0 commit comments

Comments
 (0)