/* global React, Eyebrow, Badge, Icon, Button, api */ const { useState: useStateCG, useEffect: useEffectCG } = React; const FALLBACK = [ {name:"Rizz โ€” AI dating replies", tag:"Dating ยท Lifestyle", rpm:1.00, min_views:1000, budget_remaining:24000, monthly_budget:25000, hot:true, tint:"#6366f1", status:"live"}, ]; function CampaignGrid({ onJoin }){ const [campaigns, setCampaigns] = useStateCG(FALLBACK); useEffectCG(() => { let mounted = true; api.listLiveCampaigns().then(r => { if (!mounted || r.error || !r.data) return; if (r.data.length > 0) setCampaigns(r.data); }); return () => { mounted = false; }; }, []); // Always show one "coming soon" tile after the live ones const display = [...campaigns, { soon: true, name: "Coming soon โ€” Campaign #2", tag: "TBA", tint: "#2C2C2A" }]; return (
LIVE CAMPAIGNS

Pick what you post.

Updated live ยท {new Date().toLocaleTimeString([], {hour:"2-digit", minute:"2-digit"})}
{display.map((c,i) => (
{!c.soon &&
๐Ÿ”ฅ HOT
} {!c.soon ? LIVE : COMING SOON}

{c.name}

{c.tag}
= 1000 ? `${Math.round(c.min_views/1000)}K` : String(c.min_views))}/>
))}
); } function MetaCell({label, value, accent, small}){ return (
{label}
{value}
); } window.CampaignGrid = CampaignGrid;