This commit is contained in:
Trey t
2023-06-21 08:18:50 -05:00
parent 025810f699
commit c0fd4f7d52
3 changed files with 7 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
import Foundation import Foundation
struct Workout: Codable { struct Workout: Codable, Identifiable {
let id: Int let id: Int
let name: String let name: String
let description: String? let description: String?

View File

@@ -59,11 +59,9 @@ struct AllWorkoutsView: View {
}) })
} }
} }
.sheet(isPresented: $showWorkoutDetail) { .sheet(item: $selectedWorkout) { item in
if let selectedWorkout = selectedWorkout { let viewModel = WorkoutDetailViewModel(workout: item)
let viewModel = WorkoutDetailViewModel(workout: selectedWorkout) WorkoutDetailView(viewModel: viewModel)
WorkoutDetailView(viewModel: viewModel)
}
} }
.onReceive(pub) { (output) in .onReceive(pub) { (output) in
self.needsUpdating = true self.needsUpdating = true

View File

@@ -52,6 +52,7 @@ struct TopButtonsView: View {
}, label: { }, label: {
Image(systemName: "xmark.octagon.fill") Image(systemName: "xmark.octagon.fill")
.font(.title) .font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}) })
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.red) .background(.red)
@@ -62,6 +63,7 @@ struct TopButtonsView: View {
}, label: { }, label: {
Image(systemName: "figure.golf") Image(systemName: "figure.golf")
.font(.title) .font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}) })
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.green) .background(.green)
@@ -73,6 +75,7 @@ struct TopButtonsView: View {
}, label: { }, label: {
Image(systemName: "checkmark") Image(systemName: "checkmark")
.font(.title) .font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
}) })
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.blue) .background(.blue)