Fix browser timer typing
This commit is contained in:
@@ -60,14 +60,14 @@ export const SlideShow: Component<{
|
|||||||
let playingTimeout = 0
|
let playingTimeout = 0
|
||||||
function play() {
|
function play() {
|
||||||
if (getIsPlaying()) {
|
if (getIsPlaying()) {
|
||||||
clearTimeout(playingTimeout)
|
window.clearTimeout(playingTimeout)
|
||||||
setIsPlaying(false)
|
setIsPlaying(false)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loop() {
|
function loop() {
|
||||||
next()
|
next()
|
||||||
playingTimeout = setTimeout(loop, 300)
|
playingTimeout = window.setTimeout(loop, 300)
|
||||||
}
|
}
|
||||||
setIsPlaying(true)
|
setIsPlaying(true)
|
||||||
loop()
|
loop()
|
||||||
|
|||||||
Reference in New Issue
Block a user