Skip to content

Commit

Permalink
test: add log on interval
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielforster committed Jan 24, 2024
1 parent 54829d3 commit b3eb43d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
import { ref, onMounted, onBeforeUnmount } from 'vue'
import { RouterLink } from 'vue-router'
import Dialog from 'primevue/dialog'
Expand All @@ -18,10 +18,11 @@ onMounted(() => {
fetchDataInterval.value = setInterval(() => {
fetchData()
console.log('fetching data...')
}, 1000 * 60)
})
onUnmounted(() => {
onBeforeUnmount(() => {
clearInterval(fetchDataInterval.value)
})
Expand Down

0 comments on commit b3eb43d

Please sign in to comment.