ProfileHost.swift


  1. import SwiftUI
  2. struct ProfileHost: View {
  3. @Environment(\.editMode) var editMode
  4. @EnvironmentObject var modelData: ModelData
  5. @State private var draftProfile = Profile.default
  6. var body: some View {
  7. VStack(alignment: .leading, spacing: 20) {
  8. HStack {
  9. Spacer()
  10. EditButton()
  11. }
  12. ProfileSummary(profile: modelData.profile)
  13. }
  14. .padding()
  15. }
  16. }
  17. struct ProfileHost_Previews: PreviewProvider {
  18. static var previews: some View {
  19. ProfileHost()
  20. .environmentObject(ModelData())
  21. }
  22. }