Skip to content

Commit 375b5a7

Browse files
coderabbitai[bot]CodeRabbit
andauthored
fix: apply CodeRabbit auto-fixes
Fixed 3 file(s) based on 2 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
1 parent 369b454 commit 375b5a7

3 files changed

Lines changed: 64 additions & 30 deletions

File tree

package-lock.json

Lines changed: 49 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/RemindersPage.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,19 @@ export const RemindersPage: React.FC<RemindersPageProps> = ({
6969

7070
React.useEffect(() => {
7171
let timeoutId: ReturnType<typeof setTimeout>
72+
let isMounted = true
7273
const scheduleNext = () => {
7374
timeoutId = setTimeout(() => {
75+
if (!isMounted) return
7476
setNow(Date.now())
7577
scheduleNext()
7678
}, 10000) // update every 10s for better responsiveness
7779
}
7880
scheduleNext()
79-
return () => clearTimeout(timeoutId)
81+
return () => {
82+
isMounted = false
83+
clearTimeout(timeoutId)
84+
}
8085
}, [])
8186

8287
return (

0 commit comments

Comments
 (0)