Fixed rewards page.
This commit is contained in:
@ -48,40 +48,43 @@ export default function WhaleTracker() {
|
||||
<p className="text-gray-500 text-center py-4">No big bets yet... Be the first whale!</p>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{whales.map((whale: WhaleBet) => (
|
||||
<div
|
||||
key={whale.id}
|
||||
className="bg-gradient-to-r from-green-50 to-transparent rounded-lg p-3 border-l-4 border-green-500"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<span className="text-xl">{getWhaleEmoji(whale.amount)}</span>
|
||||
<div className="min-w-0">
|
||||
<p className="text-gray-900 font-medium text-sm truncate">
|
||||
{whale.display_name || whale.username}
|
||||
{whales.map((whale: WhaleBet, index: number) => {
|
||||
const amount = whale.amount ?? 0
|
||||
return (
|
||||
<div
|
||||
key={whale.id ?? `whale-${index}`}
|
||||
className="bg-gradient-to-r from-green-50 to-transparent rounded-lg p-3 border-l-4 border-green-500"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<span className="text-xl">{getWhaleEmoji(amount)}</span>
|
||||
<div className="min-w-0">
|
||||
<p className="text-gray-900 font-medium text-sm truncate">
|
||||
{whale.display_name || whale.username || 'Unknown'}
|
||||
</p>
|
||||
<p className={`text-xs ${TIER_COLORS[whale.tier_name] || 'text-gray-500'}`}>
|
||||
{whale.tier_name || 'Unranked'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<p className="text-green-600 font-bold">
|
||||
${amount.toLocaleString()}
|
||||
</p>
|
||||
<p className={`text-xs ${TIER_COLORS[whale.tier_name] || 'text-gray-500'}`}>
|
||||
{whale.tier_name}
|
||||
<p className="text-gray-500 text-xs">
|
||||
{whale.created_at ? formatDistanceToNow(new Date(whale.created_at), { addSuffix: true }) : 'Recently'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<p className="text-green-600 font-bold">
|
||||
${whale.amount.toLocaleString()}
|
||||
</p>
|
||||
<p className="text-gray-500 text-xs">
|
||||
{formatDistanceToNow(new Date(whale.created_at), { addSuffix: true })}
|
||||
</p>
|
||||
<div className="mt-2 text-xs text-gray-600 truncate">
|
||||
<span className="text-gray-400">on</span> {whale.event_title || 'Unknown event'}
|
||||
<span className="ml-2 px-1.5 py-0.5 bg-gray-100 rounded text-gray-600">
|
||||
{whale.side || '-'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-2 text-xs text-gray-600 truncate">
|
||||
<span className="text-gray-400">on</span> {whale.event_title}
|
||||
<span className="ml-2 px-1.5 py-0.5 bg-gray-100 rounded text-gray-600">
|
||||
{whale.side}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -95,14 +95,14 @@ export const EventDetail = () => {
|
||||
</div>
|
||||
|
||||
{/* Spread Grid - Visual betting grid */}
|
||||
<div className="bg-white rounded-xl shadow-sm border p-6">
|
||||
{/* <div className="bg-white rounded-xl shadow-sm border p-6">
|
||||
<h2 className="text-xl font-bold text-gray-900 mb-4">Spread Grid</h2>
|
||||
<SpreadGrid
|
||||
event={event}
|
||||
onBetCreated={handleBetCreated}
|
||||
onBetTaken={handleBetTaken}
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user