import React from 'react' /** * Compact artwork card for embedding inside a PostCard. * Shows thumbnail, title and original author with attribution. */ export default function EmbeddedArtworkCard({ artwork }) { if (!artwork) return null const artUrl = `/art/${artwork.id}/${slugify(artwork.title)}` const authorUrl = `/@${artwork.author.username}` return ( {/* Thumbnail */}
{artwork.thumb_url ? ( {artwork.title} ) : (
)}
{/* Meta */}

{artwork.title}

e.stopPropagation()} className="text-xs text-slate-400 hover:text-sky-400 transition-colors mt-0.5 truncate" > by {artwork.author.name || `@${artwork.author.username}`} Artwork
) } function slugify(str) { return (str || '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') }