import React from 'react' export default function ArtworkMeta({ artwork }) { const author = artwork?.user?.name || artwork?.user?.username || 'Artist' const publishedAt = artwork?.published_at ? new Date(artwork.published_at).toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' }) : '—' const width = artwork?.dimensions?.width || 0 const height = artwork?.dimensions?.height || 0 return (

{artwork?.title}

Author
{author}
Upload date
{publishedAt}
Resolution
{width > 0 && height > 0 ? `${width} × ${height}` : '—'}
) }