// SONARA — Feed (shared across artista/producer/manager) // Instagram-light per il marketplace: scoperta, niente vanity, niente comments. // Engagement → DM. Like/Save sono privati. const FeedIcons = window.SonaraIcons; /* ─────────── Algo explanation tooltips ─────────── */ const FEED_ALGO = { perte: "Match coi tuoi generi · boost geografico 25% · attività recente 15%", vicini: "Solo post da tua città/regione · cronologico", recenti: "Cronologico puro · nessun algoritmo", }; /* ─────────── Mock data ─────────── */ const FEED_POSTS = [ { id: "f1", type: "beat", time: "12m fa", author: { name: "Nico Vega", handle: "@nicovega", init: "NV", role: "Producer", verified: true, city: "Milano" }, content: { title: "Notturno", subtitle: "Trap dark · 142 BPM · F# min", cover: "g1", price: 45, exclusive: 350, duration: "3:12", tags: ["Trap", "Dark", "808 pesanti"], }, }, { id: "f2", type: "open_call", time: "32m fa", author: { name: "Alessio Marchetti", handle: "@alessiorap", init: "AR", role: "Artista", verified: true, city: "Milano" }, content: { kind: "Cerco beat custom", brief: "Cerco beat trap 808 pesante stile Travis Scott late-night. Per uscita estate, EP 5 tracce. Ref: After Hours, Headlines.", budget: { min: 100, max: 200 }, deadline: "10gg", offers: 4, tags: ["Trap", "Custom", "BPM 138-145"], }, }, { id: "f3", type: "status", time: "1h fa", author: { name: "Studio Riva", handle: "@studioriva", init: "SR", role: "Producer", verified: true, city: "Bologna", studio: true }, content: { text: "Aperto a 2 mix questa settimana — preferenza cantautorato / indie. Risposte entro 6h, niente listing pubblico per ora. Scrivetemi in DM con stems già pronti.", }, }, { id: "f4", type: "servizio", time: "2h fa", author: { name: "Sara D'Onofrio", handle: "@saradonofrio", init: "SD", role: "Producer", verified: true, city: "Milano" }, content: { title: "Vocal production + tuning premium", category: "Vocal production", from: 120, delivery: "2gg", revisions: 2, tags: ["R&B", "Alt-pop", "Indie"], teaser: "Lavoro con voci femminili emergenti, già 52 progetti chiusi su Sonara.", }, }, { id: "f5", type: "open_call", time: "3h fa", author: { name: "Andrea Conti", handle: "@andreaconti", init: "AC", role: "Manager", verified: true, city: "Milano" }, content: { kind: "Cerco talenti per roster", brief: "Sto aprendo 1-2 posizioni nel roster per artisti alt-pop / indie tra i 18 e i 26 anni con almeno un singolo pubblicato. Focus campagna 2027.", tags: ["Alt-pop", "Indie", "Cantautorato"], }, }, { id: "f6", type: "beat", time: "5h fa", author: { name: "Yoshi K.", handle: "@yoshik", init: "YK", role: "Producer", verified: false, city: "Milano" }, content: { title: "Lupo Solitario", subtitle: "Drill UK · 145 BPM · D min", cover: "g3", price: 40, exclusive: 300, duration: "2:55", tags: ["Drill", "UK", "Dark"], }, }, { id: "f7", type: "milestone", time: "Ieri", author: { name: "Marco Vitale", handle: "@marcovit", init: "MV", role: "Producer", verified: true, city: "Roma" }, content: { icon: "trophy", text: "Ho appena chiuso il 50° ordine su Sonara. Grazie a tutti gli artisti R&B che mi hanno scelto in questi 2 anni 🎚", stat: "50 ordini chiusi · ★ 4.9 media", }, }, { id: "f8", type: "status", time: "Ieri", author: { name: "Giulia Wave", handle: "@giuliawave", init: "GW", role: "Artista", verified: false, city: "Milano" }, content: { text: "Primo singolo \"Marble\" è fuori su tutte le piattaforme. Grazie a chi ha mixato e masterizzato con me su Sonara. Disponibile per featuring alt-pop.", }, }, { id: "f9", type: "servizio", time: "2gg fa", author: { name: "Diego K.", handle: "@diegok", init: "DK", role: "Producer", verified: true, city: "Napoli" }, content: { title: "Custom production afro/trap", category: "Custom production", from: 90, delivery: "5gg", revisions: 3, tags: ["Afro", "Trap", "Hip-hop"], teaser: "Beat su brief con stems separati e mix base inclusi.", }, }, ]; /* ─────────── Composer (sticky) ─────────── */ function FeedComposer({ role }) { const [open, setOpen] = React.useState(false); const [type, setType] = React.useState(null); const [text, setText] = React.useState(""); const types = [ role === "manager" ? { v: "open_call", l: "Open call talenti", s: "Cerco artisti per il mio roster", ic: "users" } : role === "artista" ? { v: "open_call", l: "Pubblica richiesta", s: "Cerco un beat / mix / servizio", ic: "target" } : { v: "beat", l: "Annuncia un nuovo beat", s: "Riprendi dal catalog", ic: "disc" }, role === "producer" ? { v: "servizio", l: "Annuncia un servizio", s: "Mix / master / custom / vocal", ic: "mixer" } : { v: "open_call", l: "Open call featuring", s: "Cerco collab", ic: "collaboration" }, { v: "status", l: "Status / disponibilità", s: "Aggiornamento veloce (max 280)", ic: "zap" }, ].filter(Boolean); return ( <> {open && (
setOpen(false)}>
e.stopPropagation()}>
{type ? types.find(t => t.v === type)?.l : "Cosa vuoi condividere?"}
{!type && (
{types.map(t => { const Ic = FeedIcons[t.ic] || FeedIcons.zap; return ( ); })}
)} {type === "status" && (