Closed GideonNeedleman closed 7 months ago
Refactored programData
should be an array of programs. Each program will have following properties:
workouts
is an array of integers. Each integer is the id of a workout in workoutData
. next
holds a single integer as value. This references the index of workouts
array that is the next workout to be done. Used for highlighting workoutButton
on home screen with variant = 'primary'
This refactor will affect many things. From rendering programCard
to handling how workouts are ended and next
flag is incremented, to how programs are created & edited. Also if I implement rearranging workouts within edit program, then will need logic to correctly change next
. This is a large breaking change, but it's the correct data structure.
Current
programData
contains entire workout and exercise data. Should only reference the workout. Smaller data size.