refactor: use mdx rsc
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
import { allAuthors } from 'contentlayer/generated'
|
||||
import About from './About'
|
||||
import { Authors, allAuthors } from 'contentlayer/generated'
|
||||
import { Mdx } from '@/components/MDXComponents'
|
||||
import AuthorLayout from '@/layouts/AuthorLayout'
|
||||
import { coreContent } from 'pliny/utils/contentlayer'
|
||||
|
||||
export default function Page() {
|
||||
const author = allAuthors.find((p) => p.slug === 'default')
|
||||
return <About author={author} />
|
||||
const author = allAuthors.find((p) => p.slug === 'default') as Authors
|
||||
const mainContent = coreContent(author)
|
||||
|
||||
return (
|
||||
<>
|
||||
<AuthorLayout content={mainContent}>
|
||||
<Mdx code={author.body.code} />
|
||||
</AuthorLayout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user