Closes #011 - Refactor Smart Money tab and extend DEV_MODE shield
This commit is contained in:
@@ -80,6 +80,7 @@ export default function InsiderDemo() {
|
||||
}[] | null>(null);
|
||||
const [showMathAccordion, setShowMathAccordion] = useState(false);
|
||||
const [isMathModalOpen, setIsMathModalOpen] = useState(false);
|
||||
const [isShieldActive, setIsShieldActive] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [errorMsg, setErrorMsg] = useState<string | null>(null);
|
||||
|
||||
@@ -105,6 +106,7 @@ export default function InsiderDemo() {
|
||||
})
|
||||
]);
|
||||
if (active) {
|
||||
setIsShieldActive(!!execRes.isShieldActive || !!congRes.isShieldActive || !!whaleRes.isShieldActive);
|
||||
const unavailable: string[] = [];
|
||||
if (execRes.liveDataAvailable === false) unavailable.push('Executives (Form 4)');
|
||||
if (congRes.liveDataAvailable === false) unavailable.push('Congress (Stock Act)');
|
||||
@@ -247,8 +249,19 @@ export default function InsiderDemo() {
|
||||
<div className="flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4 border-b border-slate-800 pb-4 mb-6">
|
||||
<div>
|
||||
<span className="text-purple-400 text-xs font-semibold uppercase tracking-wider">Element 3</span>
|
||||
<h2 className="text-2xl font-bold bg-gradient-to-r from-purple-400 to-indigo-200 bg-clip-text text-transparent">
|
||||
Institutional & Insider Flow Tracker
|
||||
<h2 className="text-2xl font-bold bg-gradient-to-r from-purple-400 to-indigo-200 bg-clip-text text-transparent flex flex-wrap items-center gap-2">
|
||||
<span>Institutional & Insider Flow Tracker</span>
|
||||
{isShieldActive ? (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 shadow-[0_0_10px_rgba(245,158,11,0.15)] animate-pulse">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-amber-500" />
|
||||
DEV-ARCHIV AKTIV (0 CALLS)
|
||||
</span>
|
||||
) : (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 shadow-[0_0_10px_rgba(16,185,129,0.15)]">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-ping" />
|
||||
LIVE-API ENDPUNKT (FMP CORPO)
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
|
||||
Reference in New Issue
Block a user