--- import BlogCard from './BlogCard.astro'; import type { ImageMetadata } from 'astro'; interface RelatedPost { title: string; description: string; pubDate: Date; heroImage?: ImageMetadata; category?: string; tags?: string[]; href: string; } interface Props { posts: RelatedPost[]; class?: string; } const { posts, class: className = '' } = Astro.props; --- {posts.length > 0 && (
/// RELATED ARTICLES
{posts.slice(0, 3).map((post) => ( ))}
)}