clean up ActiveWorkoutSession

This commit is contained in:
Felix Förtsch
2024-11-12 14:47:59 +01:00
parent 19b3d89010
commit 370e070fcd
20 changed files with 281 additions and 238 deletions

View File

@@ -31,17 +31,7 @@ struct ExerciseLibrary: View {
List {
Section {
ForEach(filteredItems) { exercise in
NavigationLink {
ExerciseEditor(exercise: exercise)
} label: {
HStack {
Text(exercise.name)
Spacer()
// Text(exercise.metric.rawValue)
// .font(.footnote)
// .foregroundStyle(.gray)
}
}
NavigationLink(destination: ExerciseDetail(exercise: exercise), label: {Text(exercise.name)})
}
.onDelete(perform: deleteExercise)
if filteredItems.isEmpty {
@@ -66,7 +56,7 @@ struct ExerciseLibrary: View {
}
}
.sheet(isPresented: $isAddingExercise) {
ExerciseEditor(isPresentedAsSheet: true)
AddExercise(isPresentedAsSheet: true)
}
}