Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 49 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/MainActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function MainActionMenu() {
fontSize: 14,
}}
>
Reminders
Tasks
</button>
<button
onClick={() => {
Expand Down
7 changes: 6 additions & 1 deletion src/components/RemindersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,19 @@ export const RemindersPage: React.FC<RemindersPageProps> = ({

React.useEffect(() => {
let timeoutId: ReturnType<typeof setTimeout>
let isMounted = true
const scheduleNext = () => {
timeoutId = setTimeout(() => {
if (!isMounted) return
setNow(Date.now())
scheduleNext()
}, 10000) // update every 10s for better responsiveness
}
scheduleNext()
return () => clearTimeout(timeoutId)
return () => {
isMounted = false
clearTimeout(timeoutId)
}
}, [])

return (
Expand Down
Loading
Loading