import { GeoJsonObject } from 'geojson'; import React, { useEffect, useState } from 'react'; import { GeoJSON } from 'react-leaflet'; import { FloodEnablementState } from '../../config/map-config'; import { apiGet } from '../../apiHelpers'; export function VistaBoundaryLayer({enablement}: {enablement: FloodEnablementState}) { const [boundaryGeojson, setBoundaryGeojson] = useState(null); useEffect(() => { apiGet('/geometries/protected_vistas.geojson') .then(data => setBoundaryGeojson(data as GeoJsonObject)); }, []); if(enablement == "enabled") { return boundaryGeojson && ; } else if (enablement == "disabled") { return
} }