complete then get health data on completion screen
This commit is contained in:
@@ -15,6 +15,7 @@ struct ActionsView: View {
|
||||
var workout: Workout
|
||||
@Environment(\.dismiss) var dismiss
|
||||
var showAddToCalendar: Bool
|
||||
var startWorkoutAction: (() -> Void)
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
@@ -45,7 +46,7 @@ struct ActionsView: View {
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
startWorkout()
|
||||
startWorkoutAction()
|
||||
}, label: {
|
||||
Image(systemName: "arrowtriangle.forward.fill")
|
||||
.font(.title)
|
||||
@@ -94,15 +95,11 @@ struct ActionsView: View {
|
||||
func nextExercise() {
|
||||
bridgeModule.nextExercise()
|
||||
}
|
||||
|
||||
func startWorkout() {
|
||||
bridgeModule.start(workout: workout)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct ActionsView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ActionsView(workout: PreviewData.workout(), showAddToCalendar: true)
|
||||
ActionsView(workout: PreviewData.workout(), showAddToCalendar: true, startWorkoutAction: {})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user