{post.title}
{post.author}
{ post.written &&{post.written.toLocaleDateString()}
}import BlogPostController from "@/server/controllers/blogpost.controller"; import Image from "next/image"; import { MDXRemote } from "next-mdx-remote"; import { serialize } from "next-mdx-remote/serialize"; import { notFound } from "next/navigation"; export default async function PostById({ params }: { params: { postid: string }}) { const { postid } = params; const controller = new BlogPostController(); console.log({ postid }); const post = await controller.getByID(postid); if (!post) notFound(); const mdxSource = await serialize(post.content); return (
Coming soon...
{post.author}
{ post.written &&{post.written.toLocaleDateString()}
}