Fix browser timer typing

This commit is contained in:
b0txec
2026-08-21 10:21:42 +03:00
parent 9dbd2ff3a5
commit b22cedadf2
+3 -3
View File
@@ -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()
@@ -101,4 +101,4 @@ export const SlideShow: Component<{
function format(date: string) { function format(date: string) {
return date.slice(11, 13) // 2025-02-23T1500Z -> 15 return date.slice(11, 13) // 2025-02-23T1500Z -> 15
} }