Massive bug fix. Clear button added into fields.

This commit is contained in:
AG
2025-12-05 20:31:02 +02:00
parent 41d1d0f16a
commit 27afacee3f
14 changed files with 155 additions and 120 deletions

View File

@@ -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;