import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { useAutomatedHunt } from '@/hooks/useAutomatedHunt'; import { useState } from 'react'; import { Target, PlayCircle, StopCircle, RefreshCw, TrendingUp, Activity } from 'lucide-react'; export function AutomatedHuntControl() { const { huntSession, recentTargets, isScanning, startHunt, stopHunt, triggerScan } = useAutomatedHunt(); const [config, setConfig] = useState({ minVolatility: 2.0, minVolume: 100000, maxTargets: 5, scanInterval: 300, }); const handleStart = async () => { await startHunt(config); }; const isActive = huntSession?.status === 'active'; return ( 🦁 Automated Hunt Loop Pride Scanner + QGITA + OMS β€” Continuous opportunity detection {/* Hunt Status */} {huntSession && (
Status {isActive ? '🟒 Hunting' : '⏸️ Stopped'}
{/* Statistics Grid */}
Scans
{huntSession.total_scans}
Targets
{huntSession.total_targets_found}
Signals
{huntSession.total_signals_generated}
Queued
{huntSession.total_orders_queued}
{/* Last Scan Time */} {huntSession.last_scan_at && (
Last scan: {new Date(huntSession.last_scan_at).toLocaleTimeString()}
)}
)} {/* Configuration (only show when not active) */} {!isActive && (
setConfig({ ...config, minVolatility: parseFloat(e.target.value) })} step={0.5} min={0} className="h-8" />
setConfig({ ...config, minVolume: parseFloat(e.target.value) })} step={10000} min={0} className="h-8" />
setConfig({ ...config, maxTargets: parseInt(e.target.value) })} min={1} max={20} className="h-8" />
setConfig({ ...config, scanInterval: parseInt(e.target.value) })} step={60} min={60} className="h-8" />
)} {/* Recent Targets */} {recentTargets.length > 0 && (

Recent Targets

{recentTargets.slice(0, 5).map((target) => (
{target.symbol} {target.order_queued && ( Queued )} {target.signal_tier && ( T{target.signal_tier} )}
Score: {target.opportunity_score.toFixed(0)} | {target.volatility_24h.toFixed(1)}%
))}
)} {/* Controls */}
{isActive ? ( <> ) : ( )}
{/* Info Box */}

🦁 Hunt Loop: Scans all USDT pairs, calculates opportunity scores (volatility Γ— volume), generates QGITA signals for top targets, and queues orders via OMS.

); }