We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3601320 + f705fba commit 0d16525Copy full SHA for 0d16525
1 file changed
client/src/pages/Swipe.vue
@@ -70,11 +70,15 @@ const refreshQueueLen = () => {
70
}
71
}).then(json => {
72
queueLen.value = json["size"]
73
- pollTimeout = setTimeout(refreshQueueLen, 2000)
74
})
75
76
77
-refreshQueueLen()
+const pollQueueLen = () => {
+ refreshQueueLen()
78
+ pollTimeout = setTimeout(pollQueueLen, 2000)
79
+}
80
+
81
+pollQueueLen()
82
83
// stop polling when leaving page
84
router.beforeEach((to, from, next) => {
0 commit comments