Skip to content

Commit 45f6179

Browse files
authored
Merge pull request #13 from VariableThe/fix-agent-rule-violations
Fix agent rule violations
2 parents 8d028e6 + 8c43d03 commit 45f6179

4 files changed

Lines changed: 65 additions & 31 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/MainActionMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function MainActionMenu() {
7676
fontSize: 14,
7777
}}
7878
>
79-
Reminders
79+
Tasks
8080
</button>
8181
<button
8282
onClick={() => {

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)