File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { getBlogPosts } from '@/content/utils';
44import { baseUrl } from '@/app/sitemap' ;
55import { customComponents } from '@/mdx-components' ;
66import ClientDate from '@/app/components/client-date' ;
7+ import { ComponentType } from 'react' ;
78
89type BlogPostPageProps = {
910 params : Promise < {
@@ -70,8 +71,12 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
7071 }
7172
7273 // Import the MDX content dynamically
73- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
74- const MDXContent = await import ( `@/content/blog/${ slug } .mdx` ) ;
74+ const { default : MDXContent } = ( await import (
75+ `@/content/blog/${ slug } .mdx`
76+ ) ) as {
77+ default : ComponentType ;
78+ } ;
79+
7580 return (
7681 < div className = "container mx-auto py-8" >
7782 < article className = "prose prose-lg dark:prose-invert mx-auto" >
@@ -93,7 +98,7 @@ export default async function BlogPostPage({ params }: BlogPostPageProps) {
9398 </ span >
9499 </ span >
95100 </ p >
96- < MDXContent . default />
101+ < MDXContent />
97102 </ article >
98103 </ div >
99104 ) ;
You can’t perform that action at this time.
0 commit comments