17 lines
406 B
TypeScript
17 lines
406 B
TypeScript
"use client"; // This is required!
|
|
import { MDXRemote, type MDXRemoteSerializeResult } from "next-mdx-remote";
|
|
import Image from "next/image";
|
|
|
|
type MdxContentProps = {
|
|
source: MDXRemoteSerializeResult;
|
|
};
|
|
|
|
/** Custom components here!*/
|
|
const MdxComponents = {
|
|
Image: Image,
|
|
};
|
|
|
|
export function MdxContent({ source }: MdxContentProps) {
|
|
return <MDXRemote {...source} components={MdxComponents} />;
|
|
}
|