import { getPost } from "@/lib/posts"; import { notFound } from "next/navigation"; import Markdown from 'react-markdown'; import Navbar from "@/components/navbar"; import RecordBox from "@/components/recordbox"; interface PostPageProps { params: Promise<{ slug: string }> } export default async function PostPage({ params }: PostPageProps) { const { slug } = await params const post = await getPost(slug) if (!post) { notFound() } return (
{post.title}
{/* Post content */}
{props.children}
}, h3(props) { return
{props.children}
}, blockquote(props) { return
{props.children}
}, p(props) { return
{props.children}
}, a(props) { return {props.children} }, }}>{post.content}
) }