Skip to content

Commit be2592e

Browse files
committed
fix images
1 parent 7a28d07 commit be2592e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/src/mdx-components.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ export function useMDXComponents(components: MDXComponents): MDXComponents {
77
if (href?.startsWith('/')) {
88
href = `/react-multi-page-form${href}`;
99
}
10-
return <a href={href} {...props} />;
10+
return <a {...props} href={href} />;
11+
},
12+
img: (props) => {
13+
let src = props.src as string;
14+
if (src?.startsWith('/')) {
15+
src = `/react-multi-page-form${src}`;
16+
}
17+
// biome-ignore lint/a11y/useAltText: <explanation>
18+
return <img {...props} src={src} />;
1119
},
1220
...components,
1321
};

0 commit comments

Comments
 (0)