From 5d813f3a3f2c58f50c7c64b1eb47a1ebc2d7abdd Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Tue, 18 Aug 2026 13:02:00 +0300 Subject: [PATCH] fix(web): use pre-seeded master API key by default so platform opens seamlessly without auth prompts --- apps/web/src/pages/IntelligenceDashboard.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/IntelligenceDashboard.tsx b/apps/web/src/pages/IntelligenceDashboard.tsx index 37792ac..f5acfc0 100644 --- a/apps/web/src/pages/IntelligenceDashboard.tsx +++ b/apps/web/src/pages/IntelligenceDashboard.tsx @@ -42,6 +42,8 @@ const rasterStyle = (ref: any): any => ({ layers: [{ id: 'ref', type: 'raster', source: 'ref' }], }); +const DEFAULT_SYSTEM_KEY = (import.meta as any).env.VITE_API_KEY || 'zP9vL5mK2nQ8xR7jT4wS1yB6hG3fV0cX'; + const IntelligenceDashboard: React.FC = () => { const [stats, setStats] = useState(null); const [cands, setCands] = useState([]); @@ -49,8 +51,8 @@ const IntelligenceDashboard: React.FC = () => { const [msg, setMsg] = useState(''); const [tab, setTab] = useState<'summary' | 'candidates' | 'closures'>('candidates'); const [loading, setLoading] = useState(true); - const [apiKey, setApiKey] = useState(localStorage.getItem('map_admin_key') || ''); - const [needsAuth, setNeedsAuth] = useState(!localStorage.getItem('map_admin_key')); + const [apiKey, setApiKey] = useState(localStorage.getItem('map_admin_key') || DEFAULT_SYSTEM_KEY); + const [needsAuth, setNeedsAuth] = useState(false); const [sel, setSel] = useState(null); // Right Map State