Repository navigation
Commit 2a5cf31
committed
fix: add cleanup to showTime timer effect to prevent stale timeout
Merged the separate cleanup useEffect into the showTime effect's
return function. This ensures the 5s timer is properly cleared
when remainingSeconds/totalSeconds change mid-countdown, preventing
a stale setShowTime(false) call after the component has moved to
a different phase.1 parent 62e8255 commit 2a5cf31
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
173 | 179 | | |
174 | | - | |
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
| |||
0 commit comments