import React from 'react' const FALLBACK = 'https://files.skinbase.org/default/missing_md.webp' const AVATAR_FALLBACK = 'https://files.skinbase.org/default/avatar_default.webp' function ArtCard({ item }) { const username = item.author_username ? `@${item.author_username}` : null return (
{item.title} { e.currentTarget.src = FALLBACK }} />
{item.title}
{item.author} { e.currentTarget.src = AVATAR_FALLBACK }} /> {item.author} {username && {username}}
{item.title} by {item.author}
) } /** * Because You Like {tag}: fresh or trending artworks for the user's top tag. * Only rendered when by_categories data is available and a top tag is known. */ export default function HomeBecauseYouLike({ items, preferences }) { const topTag = preferences?.top_tags?.[0] if (!Array.isArray(items) || items.length === 0 || !topTag) return null return (

✨ Because You Like{' '} #{topTag}

See all →
{items.slice(0, Math.floor(items.length / 5) * 5 || items.length).map((item) => ( ))}
) }