fix(web): use pre-seeded master API key by default so platform opens seamlessly without auth prompts
This commit is contained in:
@@ -42,6 +42,8 @@ const rasterStyle = (ref: any): any => ({
|
|||||||
layers: [{ id: 'ref', type: 'raster', source: 'ref' }],
|
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 IntelligenceDashboard: React.FC = () => {
|
||||||
const [stats, setStats] = useState<any>(null);
|
const [stats, setStats] = useState<any>(null);
|
||||||
const [cands, setCands] = useState<CandidateRoad[]>([]);
|
const [cands, setCands] = useState<CandidateRoad[]>([]);
|
||||||
@@ -49,8 +51,8 @@ const IntelligenceDashboard: React.FC = () => {
|
|||||||
const [msg, setMsg] = useState('');
|
const [msg, setMsg] = useState('');
|
||||||
const [tab, setTab] = useState<'summary' | 'candidates' | 'closures'>('candidates');
|
const [tab, setTab] = useState<'summary' | 'candidates' | 'closures'>('candidates');
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [apiKey, setApiKey] = useState(localStorage.getItem('map_admin_key') || '');
|
const [apiKey, setApiKey] = useState(localStorage.getItem('map_admin_key') || DEFAULT_SYSTEM_KEY);
|
||||||
const [needsAuth, setNeedsAuth] = useState(!localStorage.getItem('map_admin_key'));
|
const [needsAuth, setNeedsAuth] = useState(false);
|
||||||
const [sel, setSel] = useState<string | null>(null);
|
const [sel, setSel] = useState<string | null>(null);
|
||||||
|
|
||||||
// Right Map State
|
// Right Map State
|
||||||
|
|||||||
Reference in New Issue
Block a user