/* SINAIS FIFA — Dashboard (GoldeBet iframe placeholder + tools) */
const { useState: useS_D, useEffect: useE_D } = React;
const HouseFrame = () => (
);
const TilesRow = () => (
{TILES_FIFA.map((t, i) => (
{t.k}
{t.v}
{t.d &&
{t.d}
}
))}
);
const NextMatches = ({ onPick }) => (
{MATCHES_FIFA.length} hoje
{MATCHES_FIFA.map(m => (
onPick(m)}>
{m.t}BRT
{m.home.handle}
vs
{m.away.handle}
{m.league}
EV +{m.ev.toFixed(1)}%
Conf {m.conf}%
))}
);
const HISTORY_PAGE_SIZE = 10;
const SignalQueue = () => {
const [tab, setTab] = useS_D('queue'); // queue | history
const [page, setPage] = useS_D(1);
const greens = HISTORY_FIFA.filter(h => h.result === 'green').length;
const reds = HISTORY_FIFA.filter(h => h.result === 'red').length;
const items = tab === 'queue' ? QUEUE_FIFA : HISTORY_FIFA;
const totalPages = Math.max(1, Math.ceil(HISTORY_FIFA.length / HISTORY_PAGE_SIZE));
const safePage = Math.min(page, totalPages);
const paged = tab === 'history'
? items.slice((safePage - 1) * HISTORY_PAGE_SIZE, safePage * HISTORY_PAGE_SIZE)
: items;
const switchTab = (t) => { setTab(t); setPage(1); };
return (
Sinais
{tab === 'queue' ? `${QUEUE_FIFA.length} prontos` : `${greens}V · ${reds}D · ${HISTORY_FIFA.length} total`}
{paged.length === 0 && (
{tab === 'queue' ? 'sem sinais aguardando dispatch' : 'sem histórico no período'}
)}
{paged.map(q => {
const gameUrl = q.url || `${AFFIL.gameUrlBase}${q.matchId}`;
return (
{q.kickoff}BRT
{q.match}
{tab === 'history' && (
{q.result === 'green' ? '✓' : q.result === 'red' ? '✗' : '∅'} {q.score}
)}
{q.pick} @ {q.odd} · EV +{q.ev}%
{tab === 'queue' && (
Ir →
)}
);
})}
{tab === 'history' && totalPages > 1 && (
página {safePage} / {totalPages} · {HISTORY_FIFA.length} sinais
)}
);
};
const DEFAULT_LEAGUE_ID = 22614; // Battle 8min
const Performance = ({ onPickPlayer }) => {
const [leagueId, setLeagueId] = useS_D(window.SF_LEAGUE_ID || DEFAULT_LEAGUE_ID);
// garante que SF_LEAGUE_ID e dataset estão sincronizados na primeira render
useE_D(() => {
if (!window.SF_LEAGUE_ID) {
window.SF_LEAGUE_ID = DEFAULT_LEAGUE_ID;
if (window.loadAllData) window.loadAllData();
}
}, []);
const switchLeague = (id) => {
setLeagueId(id);
window.SF_LEAGUE_ID = id;
if (window.loadAllData) window.loadAllData();
};
const list = PERF_FIFA;
return (
Performance dos Jogadores
{list.length} jogadores
{LEAGUES_FIFA.length > 0 && (
{LEAGUES_FIFA.map(l => (
))}
)}
{list.length === 0 && (
sem jogadores com partidas registradas{leagueId ? ' nessa liga' : ''}
)}
{list.map((p, i) => (
onPickPlayer(p)}>
{String(i+1).padStart(2,'0')}
{p.handle}
{p.team}
{p.matches || p.games} jogos · ELO {p.elo || '—'}
{p.roi ? <> · ROI {p.roi >= 0 ? '+' : ''}{p.roi}%> : null}
{p.wr}%
))}
);
};
const Topbar = ({ email }) => {
const [hidden, setHidden] = useS_D(false);
useE_D(() => {
let lastY = window.scrollY;
let ticking = false;
const onScroll = () => {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const y = window.scrollY;
const diff = y - lastY;
if (y < 24) {
setHidden(false); // sempre visível no topo
} else if (diff > 8) {
setHidden(true); // rolando pra baixo → esconde
} else if (diff < -8) {
setHidden(false); // rolando pra cima → mostra
}
lastY = y;
ticking = false;
});
};
window.addEventListener('scroll', onScroll, { passive: true });
return () => window.removeEventListener('scroll', onScroll);
}, []);
return (
FE
FIFA EDGE
powered by {AFFIL.brand}
);
};
const Dashboard = ({ user, onLogout }) => {
const [picked, setPicked] = useS_D(null);
const [pickedPlayer, setPickedPlayer] = useS_D(null);
return (
{/* Premia Bet rewards banner */}
Suas apostas valem prêmios. Acumule pontos a cada depósito e troque por PIX, eletrônicos e sorteios exclusivos →
GANHAR PRÊMIOS
{/* Topbar — ocultada ao rolar pra baixo */}
{/* Main grid */}
{/* Left: GoldeBet iframe */}
{/* Right: tools */}
{/* Footer */}
JOGUE COM RESPONSABILIDADE
FIFA EDGE é um sistema de sinais e ferramentas estatísticas para e-Soccer.
Apostas envolvem risco · não há garantia de retorno.
{picked &&
setPicked(null)} />}
{pickedPlayer && setPickedPlayer(null)} />}
);
};
window.Dashboard = Dashboard;