refactor: unify artwork card rendering

This commit is contained in:
2026-03-17 14:49:20 +01:00
parent 78151aabfe
commit 980a15f66e
30 changed files with 1145 additions and 656 deletions

View File

@@ -0,0 +1,32 @@
import React from 'react'
import ArtworkGallery from './ArtworkGallery'
function cx(...parts) {
return parts.filter(Boolean).join(' ')
}
export default function ArtworkGalleryGrid({
items,
compact = false,
showStats = true,
showAuthor = true,
limit,
className = '',
cardClassName = '',
}) {
if (!Array.isArray(items) || items.length === 0) return null
const visibleItems = typeof limit === 'number' ? items.slice(0, limit) : items
return (
<ArtworkGallery
items={visibleItems}
layout="grid"
compact={compact}
showStats={showStats}
showAuthor={showAuthor}
className={cx(className)}
cardClassName={cardClassName}
/>
)
}