Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
caulagi committed Sep 7, 2023
1 parent 912c4cb commit 4025338
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 19 deletions.
2 changes: 0 additions & 2 deletions _posts/complementing-python-with-rust.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,4 @@ There are a few talks that I borrowed ideas from — [here](https://www.youtube.

You can also watch a recording of the video, but if you have already read so far, there is nothing new in the video. I start at 3 mins.

::youtube[Python meetup at Fyndiq]{#uBzRF8_UKNw}

Happy to hear comments/suggestions on [twitter](https://twitter.com/caulagi).
26 changes: 19 additions & 7 deletions components/post-body.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
import dynamic from 'next/dynamic'
import { MDXRemote } from 'next-mdx-remote'
import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote'
import {
Card,
CardHeader,
CardBody,
CardFooter,
Divider,
Link,
Image,
} from '@nextui-org/react'

type PostBodyProps = {
source: string
source: MDXRemoteSerializeResult
}

const components = {
Card: dynamic(() => import('@nextui-org/react').then((mod) => mod.Card)),
Card,
CardBody,
CardHeader,
CardFooter,
Divider,
Link,
Image,
}

const PostBody: React.FC<PostBodyProps> = ({ source }) => {
console.log(source)
console.log(components)
return <MDXRemote {...source} components={components} />
return <MDXRemote {...source} components={{ ...components }} />
}

export default PostBody
Loading

0 comments on commit 4025338

Please sign in to comment.