import { notFound } from 'next/navigation'; import { MDXRemote } from 'next-mdx-remote/rsc'; import { getPostBySlug } from '@/lib/blog'; interface BlogPostProps { params: { locale: string; slug: string; }; } export default async function BlogPost({ params: { locale, slug } }: BlogPostProps) { const post = await getPostBySlug(slug, locale); if (!post) { notFound(); } return (
{new Date(post.frontmatter.date).toLocaleDateString(locale, { year: 'numeric', month: 'long', day: 'numeric' })}

{post.frontmatter.title}

{post.frontmatter.featuredImage && (
{post.frontmatter.title}
)}
); }