import Link from "next/link"; import Image from "next/image"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardFooter } from "@/components/ui/card"; import { Eye } from "lucide-react"; import { BlogPost } from "@/lib/types"; interface PostCardProps { post: BlogPost; } export function PostCard({ post }: PostCardProps) { return ( {post.featuredImageUrl && (
{post.featuredImageAlt
)} {post.categories.length > 0 && (
{post.categories.slice(0, 3).map((cat) => ( {cat} ))}
)}

{post.title}

{post.excerpt && (

{post.excerpt}

)}
{post.tags.slice(0, 3).map((tag) => ( #{tag} ))}
{post.views.toLocaleString()}
); }