Simplified img component in page.tsx

This commit is contained in:
Jonas List 2025-04-16 17:50:05 +02:00
parent cf3b441e2e
commit bc311a4ac7
2 changed files with 2 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 KiB

After

Width:  |  Height:  |  Size: 719 KiB

Before After
Before After

View file

@ -29,10 +29,8 @@ export default async function Page(props: {
components={{
...defaultMdxComponents,
a: createRelativeLink(source, page),
img: (props: React.ImgHTMLAttributes<HTMLImageElement>) => {
const { src, ...rest } = props;
if (typeof src !== "string") return null;
return <ImageZoom src={src} {...rest} />;
img: (props) => {
return <ImageZoom {...props} />;
},
pre: (props) => (
<CodeBlock {...props}>