()
| 16 | on(retry, (current) => { |
| 17 | if (!current) return |
| 18 | const update = () => { |
| 19 | const next = retry()?.next |
| 20 | if (!next) return |
| 21 | setSeconds(Math.round((next - Date.now()) / 1000)) |
| 22 | } |
| 23 | update() |
| 24 | const timer = setInterval(update, 1000) |
| 25 | onCleanup(() => clearInterval(timer)) |