Workout Management tests done
This commit is contained in:
@@ -80,7 +80,7 @@ export const useTracker = (props: any) => { // Props ignored/removed
|
||||
loadQuickLogSession();
|
||||
};
|
||||
loadData();
|
||||
}, [activeSession, userId, userWeight, activePlan]);
|
||||
}, [activeSession?.id, userId, userWeight, activePlan?.id, isSporadicMode]);
|
||||
|
||||
// Function to reload Quick Log session
|
||||
const loadQuickLogSession = async () => {
|
||||
@@ -99,7 +99,7 @@ export const useTracker = (props: any) => { // Props ignored/removed
|
||||
const step = planExec.getCurrentStep();
|
||||
if (step) {
|
||||
const exDef = exercises.find(e => e.id === step.exerciseId);
|
||||
if (exDef) {
|
||||
if (exDef && selectedExercise?.id !== exDef.id) {
|
||||
setSelectedExercise(exDef);
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,7 @@ export const useTracker = (props: any) => { // Props ignored/removed
|
||||
await form.updateFormFromLastSet(selectedExercise.id, selectedExercise.type, selectedExercise.bodyWeightPercentage);
|
||||
} else {
|
||||
setSearchQuery('');
|
||||
form.resetForm();
|
||||
}
|
||||
};
|
||||
updateSelection();
|
||||
@@ -155,7 +156,7 @@ export const useTracker = (props: any) => { // Props ignored/removed
|
||||
setSporadicSuccess(true);
|
||||
setTimeout(() => setSporadicSuccess(false), 2000);
|
||||
loadQuickLogSession();
|
||||
form.resetForm();
|
||||
// form.resetForm(); // Persist values
|
||||
refreshHistory();
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user