import Link from 'next/link'; import type { Post } from 'contentlayer/generated'; import { siteConfig } from '@/lib/config'; interface PostCardProps { post: Post; } export function PostCard({ post }: PostCardProps) { const cover = post.feature_image && post.feature_image.startsWith('../assets') ? post.feature_image.replace('../assets', '/assets') : undefined; return (
{cover && (
{/* eslint-disable-next-line @next/next/no-img-element */} {post.title}
)}

{post.title}

{post.published_at && ( {new Date(post.published_at).toLocaleDateString( siteConfig.defaultLocale )} )} {post.tags && post.tags.length > 0 && ( {post.tags.slice(0, 3).map((t) => ( #{t} ))} )}
{post.description && (

{post.description}

)}
); }