123456789101112131415161718192021222324252627282930 |
- //
- // ProfileView.swift
- // Comedores Sociales
- //
- // Created by Hector Carrion on 12/16/20.
- //
-
- import SwiftUI
-
- struct ProfileView: View {
-
- @EnvironmentObject var profileVM: ProfileViewModel
-
- var body: some View {
- VStack(alignment: .leading, spacing: 20) {
- if profileVM.response == .unfetched {
- ProfileSummary(profile: Profile.default)
- } else if profileVM.response == .success {
- ProfileSummary(profile: profileVM.profile)
- }
- }
- .padding()
- }
- }
-
- struct ProfileView_Previews: PreviewProvider {
- static var previews: some View {
- ProfileView()
- }
- }
|