Created
July 30, 2025 21:36
-
-
Save amadeu01/0ba678eb36958fa6f05ff14ab11798b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SettingsView: View { | |
@Environment(Coordinator.self) private var coordinator | |
@Environment(AuthManager.self) private var authManager | |
var body: some View { | |
List { | |
Section { | |
HStack { | |
Image(systemName: "person.crop.circle") | |
.resizable() | |
.frame(width: 60, height: 60) | |
.clipShape(Circle()) | |
VStack(alignment: .leading) { | |
Text("Amadeu Cavalcante") | |
.font(.headline) | |
Text("[email protected]") | |
.font(.subheadline) | |
.foregroundColor(.gray) | |
} | |
.padding(.leading, 8) | |
} | |
.padding(.vertical, 4) | |
} | |
Section { | |
Label("Personal Information", systemImage: "person.text.rectangle") | |
Label("Sign-In & Security", systemImage: "key.fill") | |
Label("Payment & Shipping", systemImage: "creditcard.fill") | |
} | |
Section { | |
Label("iCloud", systemImage: "icloud.fill") | |
Label("Family", systemImage: "person.3.fill") | |
Label("Sign in with Apple", systemImage: "apple.logo") | |
} | |
Section { | |
HStack { | |
Spacer() | |
ProgressView() | |
Spacer() | |
} | |
} | |
Section { | |
Button(role: .destructive) { | |
// sign out action here | |
} label: { | |
Text("Sign Out") | |
.frame(maxWidth: .infinity, alignment: .center) | |
} | |
} | |
} | |
.navigationTitle("Settings") | |
.navigationBarBackButtonHidden(true) | |
.toolbar { | |
ToolbarItem(placement: .navigationBarLeading) { | |
Button(action: { | |
coordinator.pop() | |
}) { | |
HStack { | |
Image(systemName: "chevron.left") | |
// Text("Back") | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment