chore: final build validation and cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { notFound } from 'next/navigation'
|
||||
import { MDXRemote } from 'next-mdx-remote/rsc'
|
||||
import { useMDXComponents } from '@/mdx-components'
|
||||
import { getMDXComponents } from '@/mdx-components'
|
||||
import remarkMath from 'remark-math'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import smartypants from 'remark-smartypants'
|
||||
@@ -64,7 +64,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
|
||||
<div className="prose prose-lg max-w-none">
|
||||
<MDXRemote
|
||||
source={post.source}
|
||||
components={useMDXComponents({})}
|
||||
components={getMDXComponents({})}
|
||||
options={{
|
||||
mdxOptions: {
|
||||
remarkPlugins: [smartypants, remarkMath, remarkGfm],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { MDXComponents } from 'mdx/types'
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
export function getMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
...components,
|
||||
// Typography
|
||||
|
||||
Reference in New Issue
Block a user