mirror of
https://github.com/fergalmoran/supanextail.git
synced 2025-12-22 01:10:01 +00:00
- Improved the blog posts - Add a test to visit the blog index - Add Tailwind Typography for the markdown blog posts
19 lines
411 B
TypeScript
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;
|