This commit is contained in:
Trey t
2023-06-15 21:35:42 -05:00
parent bf58ca5167
commit c2ea70305c
16 changed files with 54630 additions and 78 deletions

View File

@@ -20,24 +20,6 @@ struct MainView: View {
} else {
Text("no workout selected")
}
}.onAppear{
testParse()
}
}
func testParse() {
if let filepath = Bundle.main.path(forResource: "WorkoutOne", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode(Workout.self, from: data)
bridgeModule.currentWorkout = workout
self.workout = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
}