diff --git a/apps/docs/app/[lang]/blog/[[...slug]]/page.tsx b/apps/docs/app/[lang]/blog/[[...slug]]/page.tsx
index bcea85046..1fd6d69eb 100644
--- a/apps/docs/app/[lang]/blog/[[...slug]]/page.tsx
+++ b/apps/docs/app/[lang]/blog/[[...slug]]/page.tsx
@@ -6,6 +6,16 @@ import { baseOptions } from '@/app/layout.config';
import Link from 'next/link';
import { ArrowLeft } from 'lucide-react';
+// Extended type for blog post data
+interface BlogPostData {
+ title: string;
+ description?: string;
+ author?: string;
+ date?: string;
+ tags?: string[];
+ body: React.ComponentType;
+}
+
export default async function BlogPage({
params,
}: {
@@ -28,52 +38,55 @@ export default async function BlogPage({
- {posts.map((post) => (
-
-
-
- {post.data.title}
-
- {post.data.description && (
-
- {post.data.description}
-
- )}
-
-
-
- {post.data.date && (
-
- )}
- {post.data.author && (
- By {post.data.author}
- )}
-
-
- {post.data.tags && post.data.tags.length > 0 && (
-
- {post.data.tags.map((tag: string) => (
-
- {tag}
-
- ))}
+ {posts.map((post) => {
+ const postData = post.data as unknown as BlogPostData;
+ return (
+
+
+
+ {postData.title}
+
+ {postData.description && (
+
+ {postData.description}
+
+ )}
+
+
+
+ {postData.date && (
+
+ )}
+ {postData.author && (
+ By {postData.author}
+ )}
- )}
-
- ))}
+
+ {postData.tags && postData.tags.length > 0 && (
+
+ {postData.tags.map((tag: string) => (
+
+ {tag}
+
+ ))}
+
+ )}
+
+ );
+ })}
{posts.length === 0 && (
@@ -93,6 +106,7 @@ export default async function BlogPage({
notFound();
}
+ const pageData = page.data as unknown as BlogPostData;
const MDX = page.data.body;
return (
@@ -108,32 +122,32 @@ export default async function BlogPage({
- {page.data.title}
+ {pageData.title}
- {page.data.description && (
+ {pageData.description && (
- {page.data.description}
+ {pageData.description}
)}
- {page.data.date && (
-
- {page.data.tags && page.data.tags.length > 0 && (
+ {pageData.tags && pageData.tags.length > 0 && (
- {page.data.tags.map((tag: string) => (
+ {pageData.tags.map((tag: string) => (