import Link from "next/link"; import { FrontMatter } from "../types/types"; export interface BasicArticleProps extends FrontMatter { title: string; description: string; date: string; author: string; authorLink: string; thumbnail: string; } export const PostHeader = ({ frontMatter, estTime, }: { frontMatter: FrontMatter; estTime: number; }) => { const { title, author, date, description, authorLink } = frontMatter as BasicArticleProps; return (
{title}
{description}
{author && (
By{" "} {authorLink && ( @{author} )} {!authorLink && ( @{author} )}
)}
{date}
{estTime} min read
); };