Skip to content

Commit 8bb4d51

Browse files
committed
chore(website): Supress hydration for markdown
Enabling StrictMode causes the renderers to run twice so the client ids have been "seen" once more than the server. This causes the ids to be off by one -_-
1 parent 3203af4 commit 8bb4d51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/documentation/src/components/Markdown/renderers.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const renderers: MarkdownRenderers = {
8080

8181
const id = useSluggedId(tokens);
8282
return (
83-
<Typography id={id} type={type}>
83+
<Typography id={id} type={type} suppressHydrationWarning>
8484
{children}
8585
</Typography>
8686
);
@@ -112,7 +112,11 @@ export const renderers: MarkdownRenderers = {
112112
// checked state instead of clicking the checkbox. Only useful if the
113113
// preview is persistent while updating the markdown.
114114
return (
115-
<li key={`${defaultChecked}`} className={styles.task}>
115+
<li
116+
key={`${defaultChecked}`}
117+
className={styles.task}
118+
suppressHydrationWarning
119+
>
116120
<Checkbox id={id} defaultChecked={defaultChecked} label={children} />
117121
</li>
118122
);

0 commit comments

Comments
 (0)