fix: update error message for getData method
This commit is contained in:
1 parent
19351094f1
commit
700d4451ac
1 file changed
+1
-6
+1
-6
@@ -90,7 +90,6 @@ export default {
|
|||||||
// Create data / vars
|
// Create data / vars
|
||||||
const data = ref([]);
|
const data = ref([]);
|
||||||
const dataLoaded = ref(null);
|
const dataLoaded = ref(null);
|
||||||
const errorMsg = ref(null);
|
|
||||||
|
|
||||||
// Get data
|
// Get data
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
@@ -102,11 +101,7 @@ export default {
|
|||||||
data.value = workouts;
|
data.value = workouts;
|
||||||
dataLoaded.value = true;
|
dataLoaded.value = true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
errorMsg.value =
|
console.warn(error);
|
||||||
"Error: There's an error reading your data, please try again later";
|
|
||||||
setTimeout(() => {
|
|
||||||
errorMsg.value = false;
|
|
||||||
}, 5000);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user