Closed GideonNeedleman closed 6 months ago
isWorkoutFinished
triggers 'finish workout' button.
it's set to true when numFinishedExercises === numExercises
numExercises
is equal to expandedWorkout.exercises.length
numFinishedExercises
is changed in the WorkoutAccordion
The problem is that numFinishedExercises
can be triggered multiple times by the same exercise. If you add a set to an already finished exercise, then finish that last set, it increments numFinishedExercises
again.
Seems to occur when I've added new exercises / sets. Messes up the trigger for the 'finish workout' button