Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix homescreen "today" being potentially out of date #5

Open
MoOx opened this issue Apr 25, 2020 · 0 comments
Open

Fix homescreen "today" being potentially out of date #5

MoOx opened this issue Apr 25, 2020 · 0 comments
Labels
bug

Comments

@MoOx
Copy link
Owner

@MoOx MoOx commented Apr 25, 2020

A ref is used and never updated. If we don't use a ref, too many render occurs (+ infinite loop).

If you open the app the day after with the same runtime session you will have a weird side effect (in addition to the header date being yesterday)

IMG_2222

To improve that, we should use a state for today + useEffect that check this with an interval?
Also, we need to check that "Updated at" message always is always ok (currently we could have "Update today at 23:59" while being at ""tomorrow 00:03"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.