bx-1379-redesign #15

Merged
ksenia_mikhailova merged 124 commits from bx-1379-redesign into dev 2024-09-06 15:39:13 +03:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 0f3087e20f - Show all commits

View File

@ -19,7 +19,7 @@ export const useTimer = defineStore('timer', {
startTimer() {
this.is_enabled = true
this.resetTimer()
this.countdownTimer()
this.timer_el = this.countdownTimer()
},
stopTimer() {
this.is_enabled = false
@ -36,7 +36,7 @@ export const useTimer = defineStore('timer', {
this.seconds_left = time
},
countdownTimer() {
this.timer_el = setInterval(() => {
const id = setInterval(() => {
if (this.is_enabled && this.seconds_left > 0) {
this.seconds_left -= 1
// this.countdownTimer()
@ -45,6 +45,7 @@ export const useTimer = defineStore('timer', {
this.stopTimer()
}
}, 1000)
return id
},
}
})