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()
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user