import Link from "next/link" import type { Post } from "@/lib/db" import { formatDate } from "@/lib/utils" import { TagBadge } from "@/components/tag-badge" export function PostCard({ post, compact = false }: { post: Post; compact?: boolean }) { if (compact) { return ( {post.title}

{post.title}

{post.artist && (

{post.artist}

)}
{post.source && ( {post.source} )} {post.published_at && ( {formatDate(post.published_at)} )}
) } return (
{post.title}

{post.title}

{post.artist && (

{post.artist}

)} {post.tags && post.tags.length > 0 && (
{post.tags.slice(0, 3).map((tag) => ( ))}
)}
{post.num_pages > 0 && {post.num_pages} pág} {post.published_at && {formatDate(post.published_at)}}
) }