Exercise archivation fixed

This commit is contained in:
AG
2025-11-25 23:32:47 +02:00
parent e3efc84250
commit 701d217c89
4 changed files with 21 additions and 13 deletions

View File

@@ -108,14 +108,12 @@ const Tracker: React.FC<TrackerProps> = ({ userId, userWeight, activeSession, ac
if (step) {
const exDef = exercises.find(e => e.id === step.exerciseId);
if (exDef) {
if (!selectedExercise || selectedExercise.id !== exDef.id) {
setSelectedExercise(exDef);
}
setSelectedExercise(exDef);
}
}
}
}
}, [activeSession, activePlan, currentStepIndex, exercises, selectedExercise]);
}, [currentStepIndex, activePlan, exercises]);
useEffect(() => {
const updateSelection = async () => {