Massive bug fix. Clear button added into fields.
This commit is contained in:
@@ -68,16 +68,7 @@ const ActiveSessionView: React.FC<ActiveSessionViewProps> = ({ tracker, activeSe
|
||||
exercises
|
||||
} = tracker;
|
||||
|
||||
// We need activePlan from the hook or props. The hook returns 'plans' but not 'activePlan'.
|
||||
// Actually useTracker takes activePlan as prop but doesn't return it.
|
||||
// We should probably pass activePlan as a prop to this component directly from the parent.
|
||||
// Let's assume the parent passes it or we modify the hook.
|
||||
// For now, let's use the activePlan passed to the hook if possible, but the hook doesn't expose it.
|
||||
// I will modify the hook to return activePlan or just accept it as prop here.
|
||||
// The hook accepts activePlan as argument, so I can return it.
|
||||
// Let's modify useTracker to return activePlan in the next step if needed, or just pass it here.
|
||||
// Wait, I can't modify useTracker easily now without rewriting it.
|
||||
// I'll pass activePlan as a prop to ActiveSessionView.
|
||||
|
||||
|
||||
const isPlanFinished = activePlan && currentStepIndex >= activePlan.steps.length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user