// SONARA — Profilo page (artista) — toggle Anteprima / Modifica
const PfIcons = window.SonaraIcons;
const PROFILE = {
name: "Luca Marini",
handle: "@lucamarini",
initials: "LM",
verified: true,
active: true,
location: "Milano, IT",
joined: "Aprile 2024",
followers: 1248,
rating: 4.9,
ratingCount: 12,
completed: 12,
experience: "3 anni",
availability: "open",
bio: "Cantautore italiano, mixo cantautorato e produzione moderna. Lavoro su un EP per uscita 2026 — cerco producer per beat melodici, mix engineer e vocal coach per ampliare il sound.",
genres: ["Trap melodico", "R&B", "Italian indie", "Soul"],
lookingFor: ["Beat custom", "Mix + Master", "Vocal coaching", "Featuring"],
socials: { spotify: "lucamarini-official", instagram: "@lucamarini", soundcloud: "luca-marini" },
tracks: [
{ id: "t1", title: "Notte Lunga", duration: "3:24", plays: "12.4k", grad: "g1", uploaded: "2 settimane fa" },
{ id: "t2", title: "Restami", duration: "2:58", plays: "8.1k", grad: "g3", uploaded: "1 mese fa" },
{ id: "t3", title: "Caduta libera", duration: "3:42", plays: "6.7k", grad: "g4", uploaded: "1 mese fa" },
{ id: "t4", title: "Vento del sud (demo)", duration: "2:12", plays: "2.3k", grad: "g5", uploaded: "2 mesi fa" },
],
privacy: true,
};
const VerifIc = ({ size = 12 }) => ;
const PinIc = ({ size = 14 }) => ;
const CalIc = ({ size = 14 }) => ;
const UsersIc = ({ size = 14 }) => ;
const MsgIc = ({ size = 14 }) => ;
const ShareIc = ({ size = 14 }) => ;
const PlayIc = ({ size = 12 }) => ;
const HeartIc = ({ size = 14 }) => ;
const DotsIc = ({ size = 14 }) => ;
const EyeIc = ({ size = 14 }) => ;
const EditIc = ({ size = 14 }) => ;
const PlusIc = ({ size = 14 }) => ;
const CopyIc = ({ size = 13 }) => ;
const CheckIc = ({ size = 13 }) => ;
const StarIc = ({ size = 12, filled = true }) => ;
const BoltIc = ({ size = 12 }) => ;
const MusicIc = ({ size = 14 }) => ;
function PublicView() {
return (
<>
Condividi
{PROFILE.initials}
{PROFILE.verified && (
Verificato
)}
{PROFILE.active && (
Attivo
)}
{PROFILE.name}
{PROFILE.verified && Verificato }
Aperto a collaborazioni
{PROFILE.location}
Su Sonara da {PROFILE.joined}
{PROFILE.followers.toLocaleString("it-IT")} follower
{PROFILE.rating} ({PROFILE.ratingCount} recensioni)
{PROFILE.bio}
Generi
{PROFILE.genres.length} attivi
Tracce showcase
{PROFILE.tracks.length} / 6
Collaborazioni
{PROFILE.completed} completate
Su Sonara
{PROFILE.experience}
{PROFILE.genres.map(g => {g} )}
Manda messaggio
Segui
Condividi
{PROFILE.tracks.map(t => (
{t.title}
{t.duration} ·
{t.uploaded}
))}
{PROFILE.lookingFor.map(t => {t} )}
Stats profilo
Ultimi 30 giorni
Visite
2.4k
+18% vs prec.
Nuovi follower
+47
su 1.248 totali
Verificato
Identità confermata
Attivo
Artista attivo
Login + interazione ultimi 30gg
Attivo
Top Performer
≥10 collab completate, ≥4.5★
{PROFILE.completed}/10
>
);
}
function ShareBlock() {
const [copied, setCopied] = React.useState(false);
const url = `sonara.it/${PROFILE.handle.replace("@", "")}`;
return (
{url}
{ setCopied(true); setTimeout(() => setCopied(false), 1500); }}>
{copied ? <> Copiato> : <> Copia>}
Condividi su WhatsApp
Condividi su Instagram
Scansiona o stampa per locandine
);
}
function EditView() {
const [privacy, setPrivacy] = React.useState(PROFILE.privacy);
const [coverUrl, setCoverUrl] = React.useState(null);
const [avatarUrl, setAvatarUrl] = React.useState(null);
const coverRef = React.useRef(null);
const avatarRef = React.useRef(null);
const onCover = (e) => {
const f = e.target.files?.[0];
if (f) setCoverUrl(URL.createObjectURL(f));
};
const onAvatar = (e) => {
const f = e.target.files?.[0];
if (f) setAvatarUrl(URL.createObjectURL(f));
};
return (
Copertina
JPG o PNG, almeno 1500 × 500 px. Max 5 MB.
Foto profilo
Quadrata, almeno 400 × 400 px. Max 2 MB.
Nome d'arte come appare in alto
Bio 320 caratteri max
Generi
{PROFILE.genres.map(g => (
{g}
×
))}
+ Aggiungi genere
Cosa cerco
{PROFILE.lookingFor.map(g => (
{g}
×
))}
+ Aggiungi tag
{PROFILE.tracks.map(t => (
{t.title}
{t.duration} ·
{t.plays} ascolti ·
{t.uploaded}
Ordina
))}
{PROFILE.tracks.length < 6 && (
Carica nuova traccia ({6 - PROFILE.tracks.length} slot disponibili)
)}
Profilo pubblico
{privacy ? "On" : "Off"}
{privacy
? "Il tuo profilo appare in ricerche, suggerimenti e directory. Producer possono trovarti e contattarti."
: "Profilo nascosto. Visibile solo ai producer con cui hai già una chat o un progetto aperto."}
setPrivacy(!privacy)}/>
Sei verificato
Account verificato il 12 marzo 2025. Il badge ti dà più visibilità in directory e accesso a richieste premium.
);
}
function ProfiloPage() {
const [mode, setMode] = React.useState("preview");
return (
setMode("preview")}>
Anteprima
setMode("edit")}>
Modifica
{mode === "edit" ? (
<>
Annulla
Salva modifiche
>
) : (
<>
Condividi
setMode("edit")}> Modifica profilo
>
)}
{mode === "preview" ? : }
);
}
window.ProfiloPage = ProfiloPage;