Closes #011 - Refactor Smart Money tab and extend DEV_MODE shield

This commit is contained in:
Antigravity Agent
2026-06-12 21:24:01 +02:00
parent 00e88eedb2
commit b94a7fcdd8
5 changed files with 197 additions and 17 deletions

View File

@@ -12,7 +12,8 @@ import WhaleScreener from '@/components/modules/whale/WhaleScreener';
import { BarChart3, TrendingUp, ShieldAlert, Radio, Landmark, RefreshCw, Activity, Cpu, Compass } from 'lucide-react';
export default function Home() {
const [activeTab, setActiveTab] = useState<'sandbox' | 'scanner' | 'insider' | 'crypto' | 'events' | 'macro' | 'tech' | 'whale'>('sandbox');
const [activeTab, setActiveTab] = useState<'sandbox' | 'scanner' | 'smart-money' | 'crypto' | 'events' | 'macro' | 'tech'>('sandbox');
const [smartMoneySubTab, setSmartMoneySubTab] = useState<'flows' | 'screener'>('flows');
return (
<div className="min-h-screen bg-[#070b13] text-slate-100 flex flex-col font-sans selection:bg-teal-500/30 selection:text-teal-200">
@@ -78,10 +79,10 @@ export default function Home() {
<ShieldAlert className="w-4 h-4" /> Scanner
</button>
<button
onClick={() => setActiveTab('insider')}
className={`flex-1 lg:flex-none px-4 py-2.5 rounded-xl text-xs font-semibold flex items-center justify-center gap-2 transition-all ${activeTab === 'insider' ? 'bg-gradient-to-r from-purple-500 to-indigo-500 text-white font-bold shadow-lg shadow-purple-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
onClick={() => setActiveTab('smart-money')}
className={`flex-1 lg:flex-none px-4 py-2.5 rounded-xl text-xs font-semibold flex items-center justify-center gap-2 transition-all ${activeTab === 'smart-money' ? 'bg-gradient-to-r from-purple-500 to-indigo-500 text-white font-bold shadow-lg shadow-purple-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
>
<Radio className="w-4 h-4" /> Insider
<Radio className="w-4 h-4" /> Smart Money
</button>
<button
onClick={() => setActiveTab('crypto')}
@@ -105,13 +106,7 @@ export default function Home() {
onClick={() => setActiveTab('tech')}
className={`flex-1 lg:flex-none px-4 py-2.5 rounded-xl text-xs font-semibold flex items-center justify-center gap-2 transition-all ${activeTab === 'tech' ? 'bg-gradient-to-r from-teal-500 to-indigo-500 text-white font-bold shadow-lg shadow-teal-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
>
<Cpu className="w-4 h-4" /> [ AI Special Silo]
</button>
<button
onClick={() => setActiveTab('whale')}
className={`flex-1 lg:flex-none px-4 py-2.5 rounded-xl text-xs font-semibold flex items-center justify-center gap-2 transition-all ${activeTab === 'whale' ? 'bg-gradient-to-r from-blue-500 to-teal-500 text-slate-950 font-bold shadow-lg shadow-blue-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
>
<Compass className="w-4 h-4" /> [🐋 Whale Screener]
<Cpu className="w-4 h-4" /> AI Special Silo
</button>
</div>
</div>
@@ -124,12 +119,29 @@ export default function Home() {
<div className="transition-all duration-300 transform opacity-100 translate-y-0">
{activeTab === 'sandbox' && <SandboxDemo />}
{activeTab === 'scanner' && <ScannerDemo />}
{activeTab === 'insider' && <InsiderDemo />}
{activeTab === 'smart-money' && (
<div className="space-y-6">
<div className="flex bg-slate-950/80 p-1.5 rounded-xl border border-slate-800/80 max-w-lg mx-auto">
<button
onClick={() => setSmartMoneySubTab('flows')}
className={`flex-1 py-2 rounded-lg text-xs font-semibold font-sans transition-all flex items-center justify-center gap-1.5 ${smartMoneySubTab === 'flows' ? 'bg-purple-500 text-white font-bold shadow-lg shadow-purple-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
>
<Radio className="w-3.5 h-3.5" /> Broad Insider &amp; Congressional Flows
</button>
<button
onClick={() => setSmartMoneySubTab('screener')}
className={`flex-1 py-2 rounded-lg text-xs font-semibold font-sans transition-all flex items-center justify-center gap-1.5 ${smartMoneySubTab === 'screener' ? 'bg-purple-500 text-white font-bold shadow-lg shadow-purple-500/25' : 'text-slate-400 hover:text-slate-200 hover:bg-slate-900/50'}`}
>
<Compass className="w-3.5 h-3.5" /> Whale Conviction Screener (VoC)
</button>
</div>
{smartMoneySubTab === 'flows' ? <InsiderDemo /> : <WhaleScreener />}
</div>
)}
{activeTab === 'crypto' && <CryptoDemo />}
{activeTab === 'events' && <EventsDemo />}
{activeTab === 'macro' && <MacroIndicatorsDemo />}
{activeTab === 'tech' && <AiSpecialSilo />}
{activeTab === 'whale' && <WhaleScreener />}
</div>
</main>