Skip to content

Commit 6112fe4

Browse files
committed
Replace <div> with <span> for MDX to fix hydration error.
1 parent 1ef8c68 commit 6112fe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mdx/mdx-components.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const components: MDXComponents = {
9292
const alt = props.alt || "Image";
9393

9494
return (
95-
<div className="my-6 w-full overflow-hidden rounded-md">
95+
<span className="my-6 block w-full overflow-hidden rounded-md">
9696
<Image
9797
src={props.src || ""}
9898
alt={alt}
@@ -101,7 +101,7 @@ export const components: MDXComponents = {
101101
sizes="100vw"
102102
className="rounded-md shadow-sm w-full h-auto"
103103
/>
104-
</div>
104+
</span>
105105
);
106106
},
107107
};

0 commit comments

Comments
 (0)