You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
702 B
33 lines
702 B
//
|
|
// AccountView.swift
|
|
// PadelClub
|
|
//
|
|
// Created by Laurent Morvillier on 21/02/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
import LeStorage
|
|
|
|
struct AccountView: View {
|
|
|
|
var user: User
|
|
var handler: () -> ()
|
|
|
|
var body: some View {
|
|
Form {
|
|
NavigationLink("Changer de mot de passe") {
|
|
ChangePasswordView()
|
|
}
|
|
Button("Déconnexion") {
|
|
DataStore.shared.disconnect()
|
|
handler()
|
|
}
|
|
}.navigationTitle(user.username)
|
|
}
|
|
}
|
|
|
|
//#Preview {
|
|
// AccountView(user: User(username: "coco", email: ",mail", firstName: "first", lastName: "last", phone: "44444", country: "US")) {
|
|
//
|
|
// }
|
|
//}
|
|
|