// Live match registration flow — animated demo of adding events to a game function LiveMatch() { const [events, setEvents] = React.useState([ { t: "12'", type: "gol", who: "Arthur S.", detail: "Gol de cabeça" }, { t: "28'", type: "assist", who: "Arthur S.", detail: "Assistência" }, ]); const [score, setScore] = React.useState({ a: 1, b: 0 }); const [minute, setMinute] = React.useState(30); React.useEffect(() => { const timer = setInterval(() => { setMinute((m) => (m >= 90 ? 1 : m + 1)); }, 2200); return () => clearInterval(timer); }, []); const actions = [ { type: "gol", label: "Gol", icon: "sports_soccer", c: "tertiary" }, { type: "assist", label: "Assistência", icon: "handshake", c: "primary" }, { type: "falta", label: "Falta", icon: "warning", c: "warning" }, { type: "defesa", label: "Defesa", icon: "shield", c: "primary" }, ]; const addEvent = (type) => { const map = { gol: { detail: "Gol registrado" }, assist: { detail: "Assistência" }, falta: { detail: "Falta sofrida" }, defesa: { detail: "Defesa" }, }; setEvents((ev) => [ ...ev, { t: `${minute}'`, type, who: "Arthur S.", detail: map[type].detail }, ]); if (type === "gol") setScore((s) => ({ ...s, a: s.a + 1 })); }; const colorFor = (type) => { const map = { gol: "text-tertiary", assist: "text-primary", falta: "text-warning", defesa: "text-primary-dim", }; return map[type] || "text-on-surface"; }; const iconFor = (type) => { const map = { gol: "sports_soccer", assist: "handshake", falta: "warning", defesa: "shield" }; return map[type]; }; return (
/ao-vivo

Registre a partida
enquanto ela acontece.

Um toque para cada lance. O MeuCraque mantém o placar e a timeline da partida sincronizados — e gera a estatística automaticamente ao final.

    {[ { i: "bolt", t: "Hotkeys de lance", d: "Gol, assistência, falta e defesa com um toque." }, { i: "sync", t: "Sincronização offline", d: "Registre sem sinal — sincroniza depois." }, { i: "schedule", t: "Cronômetro por tempo", d: "Primeiro e segundo tempo gerenciados pelo app." }, ].map((f, i) => (
  • {f.t}
    {f.d}
  • ))}
{/* Demo panel */}
{/* Header */}
AO VIVO
{minute}'
{/* Scoreboard */}
Casa
CAAS Futmax
{score.a} : {score.b}
Fora
Lobos AC
{/* Quick actions */}
{actions.map((a) => ( ))}
{/* Events timeline */}
timeline.log
{events.slice().reverse().map((e, i) => (
{e.t} {e.detail} — {e.who}
))}
{minute}' _|
); } window.LiveMatch = LiveMatch;