Files
2026FIFAWorldCup/platform/web/components/RLMRadarBoard.tsx
QuantBot aa7e3bba76
Some checks failed
2026 World Cup Quant Platform - Production Deployment / Code Quality & Testing (push) Failing after 1m49s
2026 World Cup Quant Platform - Production Deployment / Deploy to Production VM via Rsync (push) Has been skipped
chore: migrate deployment to Gitea Actions with zero-trust rsync
2026-06-16 19:06:50 +08:00

86 lines
3.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import React from 'react';
export interface RlmAlertData {
matchName: string;
market: string;
selection: string;
ticketPct: number; // 散戶注單佔比 (例如 82%)
handlePct: number; // 大戶資金佔比 (例如 15%)
openingOdds: number;
currentOdds: number;
}
interface RlmRadarBoardProps {
alerts: RlmAlertData[];
}
export function RLMRadarBoard({ alerts }: RlmRadarBoardProps) {
if (!alerts || alerts.length === 0) {
return (
<div className="w-full bg-stone-900 p-6 rounded-lg border border-stone-700 shadow-xl flex items-center justify-center min-h-[200px]">
<p className="text-stone-500 font-dotmatrix text-lg tracking-widest uppercase">
[ ]
</p>
</div>
);
}
return (
<div className="w-full bg-stone-900 p-6 rounded-lg border border-quant-red shadow-2xl relative overflow-hidden">
{/* 背景警示條紋 */}
<div className="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-quant-red via-quant-orange to-quant-red animate-pulse-fast"></div>
<div className="mb-6 flex items-center justify-between">
<div>
<h2 className="text-2xl text-quant-red font-dotmatrix animate-blink uppercase font-bold tracking-wider">
🚨 ()
</h2>
<p className="text-stone-400 text-sm mt-1"></p>
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 gap-4">
{alerts.map((alert, index) => (
<div key={index} className="bg-stone-800 p-4 rounded border border-stone-700 hover:border-quant-orange transition-colors">
<h3 className="text-stone-200 font-bold mb-3">{alert.matchName} | {alert.market}</h3>
<div className="space-y-4">
{/* 資金流向對比 */}
<div>
<div className="flex justify-between text-xs font-dotmatrix uppercase text-stone-400 mb-1">
<span> (Tickets)</span>
<span className="text-stone-200">{alert.ticketPct}%</span>
</div>
<div className="w-full h-2 bg-stone-700 rounded overflow-hidden">
<div className="h-full bg-stone-500" style={{ width: `${alert.ticketPct}%` }}></div>
</div>
</div>
<div>
<div className="flex justify-between text-xs font-dotmatrix uppercase text-quant-orange mb-1">
<span> (Handle)</span>
<span>{alert.handlePct}%</span>
</div>
<div className="w-full h-2 bg-stone-700 rounded overflow-hidden">
<div className="h-full bg-quant-orange" style={{ width: `${alert.handlePct}%` }}></div>
</div>
</div>
{/* 賠率變動對比 */}
<div className="mt-4 pt-3 border-t border-stone-700 flex justify-between items-center">
<span className="text-sm text-stone-400"> [{alert.selection}]</span>
<div className="flex items-center space-x-3 font-dotmatrix text-lg">
<span className="text-stone-500 line-through">{alert.openingOdds.toFixed(2)}</span>
<span className="text-quant-red animate-pulse-fast font-bold"> {alert.currentOdds.toFixed(2)}</span>
</div>
</div>
</div>
</div>
))}
</div>
</div>
);
}