import Link from "next/link" import { getFormattedDateFromString } from "@/cosmic/utils" export type PostType = { id: string title: string slug: string metadata: { categories: any image: { imgix_url: string } content: string author: { title: string metadata: { image: { imgix_url: string } } } published_date: string } } export function BlogCard({ post, className, }: { post: PostType className?: string }) { return (
{post.title}
{post.metadata.categories.map((category: any) => { return ( {category.title} ) })}

{post.title}

{post.metadata.content.slice(0, 200)}...

{post.metadata.author.title}
{post.metadata.author.title}
{getFormattedDateFromString(post.metadata.published_date)}
) }