condition event fetching

This commit is contained in:
gozzy 2022-11-23 12:05:23 +00:00
parent ef4104a186
commit 2ec1ed18b1
3 changed files with 42 additions and 44 deletions

View file

@ -93,9 +93,7 @@ export default {
}
},
mounted() {
if (!this.timer) {
this.updateEvents()
}
this.updateEvents()
},
beforeDestroy() {
clearTimeout(this.timer)
@ -103,10 +101,6 @@ export default {
methods: {
updateEvents() {
this.$store.dispatch('application/updateSelectEvents')
this.timer = setTimeout(() => {
this.updateEvents()
}, 60 * 1000)
}
}
}