From 3fa9885ee5008b00ea4b4bd31f54a00b429d3dd8 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 26 Feb 2024 17:03:16 -0500 Subject: [PATCH] clear alerts on close --- frontend/src/_helpers/hydroCron.js | 4 +++- frontend/src/components/AlertPopup.vue | 8 +++++++- frontend/src/stores/alerts.js | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/_helpers/hydroCron.js b/frontend/src/_helpers/hydroCron.js index 24d2698..814264c 100644 --- a/frontend/src/_helpers/hydroCron.js +++ b/frontend/src/_helpers/hydroCron.js @@ -37,6 +37,9 @@ const queryHydroCron = async (swordFeature = null) => { console.log('fake params', params) } let json = await fetchHydroCronData(url, params, swordFeature) + if (json == null) { + return + } if (featuresStore.shouldFakeData) { let fakeData = buildFakeData([...featuresStore.selectedFeatures, json]) // update the visData before selecting the feature otherwise it will show blank @@ -65,7 +68,6 @@ const fetchHydroCronData = async (url, params, swordFeature) => { console.log(result) console.log('json', json) let features = json.results.geojson.features - console.log('features', features) if (features.length > 0) { return json }else{ diff --git a/frontend/src/components/AlertPopup.vue b/frontend/src/components/AlertPopup.vue index 5c85d34..12f68a8 100644 --- a/frontend/src/components/AlertPopup.vue +++ b/frontend/src/components/AlertPopup.vue @@ -1,9 +1,15 @@