Files
poyraz-portfolio/app/blog/[slug]/page.tsx
T

19 lines
487 B
TypeScript

import { notFound } from "next/navigation";
import { BlogDetailContent } from "@/components/blog-detail-content";
import { getBlogDetailBySlug } from "@/data/blog-detail";
type BlogDetailPageProps = {
params: Promise<{ slug: string }>;
};
export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
const { slug } = await params;
const post = await getBlogDetailBySlug(slug);
if (!post) {
notFound();
}
return <BlogDetailContent post={post} />;
}