Today I focused on fixing the core logic behind my activity tracking app. I refactored the entire data flow so the app now uses a single, consistent source of truth for all activities. This solved several issues where different parts of the app were reading from different arrays, which caused mismatched graphs and incorrect statistics.
I also fixed the calculation of active minutes. These values were previously returning zero because the component was passing the wrong arguments or reading from outdated data. After cleaning up the logic and removing duplicated state, all metrics now update correctly.
I rewrote the data loading logic so each graph now receives the correct filtered and sorted activity history. I also updated the Running Power chart to load data only when the modal opens, preventing empty renders.
Finally, I removed duplicated modals, fixed missing brackets, and cleaned up several useEffect hooks that were running unnecessarily. With these changes, the app is now stable, the UI updates correctly, and all graphs display accurate data.
Log in to leave a comment