Add one-click GIS workflow run
This commit is contained in:
@@ -27,7 +27,7 @@ export function useMapSelectionDataset({
|
||||
const deriveMapSelectionDataset = async (bbox: VectorSelectionBBox) => {
|
||||
if (!selectedProjectId || !selectedDataset || !isVectorDatasetType(selectedDataset.dataset_type)) {
|
||||
setSelectionDatasetError('Select a vector dataset before saving the area as a dataset.')
|
||||
return
|
||||
return null
|
||||
}
|
||||
setSelectionDatasetSaving(true)
|
||||
setSelectionDatasetError(null)
|
||||
@@ -41,8 +41,10 @@ export function useMapSelectionDataset({
|
||||
await loadProjectData(selectedProjectId)
|
||||
await loadDatasetDetails(selectedProjectId, derived)
|
||||
setMapLayerVisible(true)
|
||||
return derived
|
||||
} catch (error) {
|
||||
setSelectionDatasetError(formatError(error, 'Failed to save area as dataset'))
|
||||
return null
|
||||
} finally {
|
||||
setSelectionDatasetSaving(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user