refactor(blog): drive blog and home sections from markdown data

This commit is contained in:
Poyraz Avsever
2026-03-11 11:03:00 +03:00
parent 2fbf1f532d
commit be43edc6a6
10 changed files with 304 additions and 633 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
import { notFound } from "next/navigation";
import { BlogDetailContent } from "@/components/blog-detail-content";
import { getBlogDetailBySlug } from "@/data/blog-detail";
import { getBlogEngagementBySlug } from "@/data/blog-engagement";
type BlogDetailPageProps = {
params: Promise<{ slug: string }>;
@@ -9,12 +8,11 @@ type BlogDetailPageProps = {
export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
const { slug } = await params;
const post = getBlogDetailBySlug(slug);
const engagement = getBlogEngagementBySlug(slug);
const post = await getBlogDetailBySlug(slug);
if (!post) {
notFound();
}
return <BlogDetailContent post={post} engagement={engagement} />;
return <BlogDetailContent post={post} />;
}