simplify Exercise to only hold on to the unit of the metric, remove ValueKeyboard as input
This commit is contained in:
@@ -12,7 +12,7 @@ struct ExerciseLibrary: View {
|
||||
@Environment(\.modelContext) private var modelContext
|
||||
@Query(sort: \Exercise.name) private var exercises: [Exercise]
|
||||
|
||||
@State private var newExercise: Exercise = Exercise("", .reps)
|
||||
@State private var newExercise: Exercise = Exercise("")
|
||||
@State private var newExerciseName: String = ""
|
||||
@State private var isAddingExercise: Bool = false
|
||||
@FocusState private var isInputFieldFocused: Bool
|
||||
@@ -37,9 +37,9 @@ struct ExerciseLibrary: View {
|
||||
HStack {
|
||||
Text(exercise.name)
|
||||
Spacer()
|
||||
Text(exercise.metric.rawValue)
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.gray)
|
||||
// Text(exercise.metric.rawValue)
|
||||
// .font(.footnote)
|
||||
// .foregroundStyle(.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user