import { notFound } from "next/navigation" import date from "date-and-time" import "katex/dist/katex.min.css" import { getBlogPostBySlug } from "@/blog/blog" import { BlogPostContent } from "@/blog/BlogPostContent" export interface BlogPostProps { slug: string } export const BlogPost = async (props: BlogPostProps): Promise => { const { slug } = props const blogPost = await getBlogPostBySlug(slug) if (blogPost == null) { return notFound() } return (

{blogPost.frontmatter.title}

{date.format( new Date(blogPost.frontmatter.publishedOn), "DD/MM/YYYY", )}

) }