Exercise editing fixed

This commit is contained in:
aodulov
2025-11-26 09:14:25 +02:00
parent 6d08c2cf11
commit dafb8664ed
2 changed files with 3 additions and 3 deletions

View File

@@ -177,11 +177,11 @@ const Profile: React.FC<ProfileProps> = ({ user, onLogout, lang, onLanguageChang
await refreshExercises();
};
const handleSaveExerciseEdit = () => {
const handleSaveExerciseEdit = async () => {
if (editingExercise && editingExercise.name) {
saveExercise(user.id, editingExercise);
await saveExercise(user.id, editingExercise);
setEditingExercise(null);
refreshExercises();
await refreshExercises();
}
};