WIP
This commit is contained in:
@@ -41,7 +41,16 @@ struct AllWorkoutsView: View {
|
||||
Text("no workouts")
|
||||
}
|
||||
}.onAppear{
|
||||
testParse()
|
||||
AllWorkoutFetchable().fetch(completion: { result in
|
||||
switch result {
|
||||
case .success(let model):
|
||||
DispatchQueue.main.async {
|
||||
self.workouts = model
|
||||
}
|
||||
case .failure(let failure):
|
||||
fatalError("shit broke")
|
||||
}
|
||||
})
|
||||
}
|
||||
.sheet(isPresented: $showWorkoutDetail) {
|
||||
if let selectedWorkout = selectedWorkout {
|
||||
@@ -52,7 +61,7 @@ struct AllWorkoutsView: View {
|
||||
}
|
||||
|
||||
func selectedItem(workout: Workout) {
|
||||
selectedWorkout = PreviewWorkout.workout()
|
||||
selectedWorkout = workout
|
||||
}
|
||||
|
||||
func testParse() {
|
||||
|
||||
Reference in New Issue
Block a user