Files
supanextail/components/blog/post-body.tsx
Michael a85e672f9f Clean Blog system
- Improved the blog posts
- Add a test to visit the blog index
- Add Tailwind Typography for the markdown blog posts
2022-01-19 12:47:38 +01:00

19 lines
411 B
TypeScript

import React from 'react';
import { getMDXComponent } from 'mdx-bundler/client';
import { useMemo } from 'react';
type Properties = {
code: string;
};
const PostBody = ({ code }: Properties): JSX.Element => {
const BlogPost = useMemo(() => getMDXComponent(code), [code]);
return (
<div className="max-w-2xl mx-auto prose lg:prose-xl">
<BlogPost />
</div>
);
};
export default PostBody;