[MINOR] Dashboard card kan flashen na sync-refresh #9
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eddy/weegschaal-app#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleem
src/screens/DashboardScreen.tsx:43-48: Na sync wordtsetAll(cache)aangeroepen maarsetLatestTwowordt niet geüpdatet. Op regel 83:const display = all.length > 0 ? all : latestTwo— alsallna sync anders is danlatestTwo, ziet de gebruiker kort oude data inLatestMeasurementCardtot de volgende render.Oplossing
Na
setAll(cache)ooklatestTwoopnieuw berekenen:Of simpelweg:
Aangezien
freshal gesorteerd is opmeasuredAt DESC, isslice(0, 2)de twee meest recente.