Skip to content

Commit bc311a4

Browse files
committed
Simplified img component in page.tsx
1 parent cf3b441 commit bc311a4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
Loading

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ export default async function Page(props: {
2929
components={{
3030
...defaultMdxComponents,
3131
a: createRelativeLink(source, page),
32-
img: (props: React.ImgHTMLAttributes<HTMLImageElement>) => {
33-
const { src, ...rest } = props;
34-
if (typeof src !== "string") return null;
35-
return <ImageZoom src={src} {...rest} />;
32+
img: (props) => {
33+
return <ImageZoom {...props} />;
3634
},
3735
pre: (props) => (
3836
<CodeBlock {...props}>

0 commit comments

Comments
 (0)