Build world campaigns rewards and recaps

This commit is contained in:
2026-05-01 11:44:41 +02:00
parent 28e7e46e13
commit 257b0dbef6
100 changed files with 11300 additions and 367 deletions

View File

@@ -0,0 +1,28 @@
import React from 'react'
function metaItems(world) {
return [
world?.promotion_window_label || world?.timeframe_label,
Number(world?.live_submission_count || 0) > 0 ? `${Number(world.live_submission_count)} live submissions` : null,
Number(world?.relation_count || 0) > 0 ? `${Number(world.relation_count)} curated links` : null,
world?.theme?.label || world?.type || null,
].filter(Boolean)
}
export default function WorldCampaignMeta({ world, className = '' }) {
const items = metaItems(world)
if (items.length === 0) {
return null
}
return (
<div className={`flex flex-wrap gap-2 text-xs text-slate-200/75 ${className}`.trim()}>
{items.map((item) => (
<span key={item} className="rounded-full border border-white/12 bg-black/25 px-3 py-1.5">
{item}
</span>
))}
</div>
)
}