WIP
This commit is contained in:
@@ -198,54 +198,5 @@ struct AddExerciseView: View {
|
||||
return hasCorrectMuscles && hasCorrectEquipment
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// func parseExercises() {
|
||||
// if let filepath = Bundle.main.path(forResource: "Exercises", ofType: "json") {
|
||||
// do {
|
||||
// let data = try Data(NSData(contentsOfFile: filepath))
|
||||
// let workout = try JSONDecoder().decode([ExerciseExercise].self, from: data)
|
||||
// self.filteredExercises.append(contentsOf: workout)
|
||||
// self.exercises = workout
|
||||
// } catch {
|
||||
// print(error)
|
||||
// fatalError()
|
||||
// }
|
||||
// } else {
|
||||
// fatalError()
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// func parseEquipment() {
|
||||
// if let filepath = Bundle.main.path(forResource: "Equipment", ofType: "json") {
|
||||
// do {
|
||||
// let data = try Data(NSData(contentsOfFile: filepath))
|
||||
// let workout = try JSONDecoder().decode([Equipment].self, from: data)
|
||||
// self.equipment = workout
|
||||
// self.selectedEquipment.append(contentsOf: workout)
|
||||
// } catch {
|
||||
// print(error)
|
||||
// fatalError()
|
||||
// }
|
||||
// } else {
|
||||
// fatalError()
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// func parseMuscle() {
|
||||
// if let filepath = Bundle.main.path(forResource: "AllMuscles", ofType: "json") {
|
||||
// do {
|
||||
// let data = try Data(NSData(contentsOfFile: filepath))
|
||||
// let workout = try JSONDecoder().decode([Muscle].self, from: data)
|
||||
// self.muscles = workout
|
||||
// self.selectedMuscles.append(contentsOf: workout)
|
||||
// } catch {
|
||||
// print(error)
|
||||
// fatalError()
|
||||
// }
|
||||
// } else {
|
||||
// fatalError()
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user