import React from "react"; import Router from "next/router"; import ReactMarkdown from "react-markdown"; export type PostProps = { id: number; title: string; author: { name: string; email: string; } | null; content: string; published: boolean; }; const Post: React.FC<{ post: PostProps }> = ({ post }) => { const authorName = post.author ? post.author.name : "Unknown author"; return (