Files
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

14 lines
482 B
TypeScript

export const OFFLINE_GOOGLE_MAPS_API_KEY = 'AIzaSyOfflineMapCacheOnly00000000000000';
const PLACEHOLDER_KEYS = new Set(['YOUR_API_KEY_HERE', OFFLINE_GOOGLE_MAPS_API_KEY, '']);
export function getGoogleMapsApiKey(): string {
const raw = (import.meta.env.VITE_GOOGLE_MAPS_API_KEY as string | undefined) ?? '';
const key = raw.trim();
return PLACEHOLDER_KEYS.has(key) ? '' : key;
}
export function hasGoogleMapsApiKey(): boolean {
return getGoogleMapsApiKey().length > 0;
}