// // ProfileView.swift // AllIn // // Created by étudiant on 26/05/2024. // import SwiftUI struct ProfileView: View { @Binding var showMenu: Bool let parameters: [(title: String, icon: String, backgroundColor: Color, itemColor: Color)] = [ (title: "Changer de pseudo", icon: "person", backgroundColor: AllInColors.componentBackgroundColor, itemColor: AllInColors.secondaryTextColor), (title: "Changer le mot de passe", icon: "lock", backgroundColor: AllInColors.componentBackgroundColor, itemColor: AllInColors.secondaryTextColor), (title: "Supprimer le compte", icon: "trash", backgroundColor: AllInColors.componentBackgroundColor, itemColor: AllInColors.secondaryTextColor), (title: "Déconnexion", icon: "xmark", backgroundColor: AllInColors.lightPurpleColor, itemColor: .white) ] var body: some View { GeometryReader { geometry in VStack(alignment: .leading, spacing: 0) { TopBar(showMenu: self.$showMenu) VStack(alignment: .leading) { HStack { Image("defaultUserImage") .resizable() .scaledToFit() .frame(width: 80, height: 80) .cornerRadius(180) VStack(alignment: .leading, spacing: 5) { Text("Pseudo") .fontWeight(.bold) .font(.system(size: 20)) HStack(spacing: 15) { VStack(){ Text("114") .fontWeight(.heavy) .font(.system(size: 15)) Text(String(localized: "drawer_bets")) .fontWeight(.regular) .font(.system(size: 12)) .foregroundColor(AllInColors.grey600Color) } VStack(){ Text("343") .fontWeight(.heavy) .font(.system(size: 15)) Text(String(localized: "drawer_best_win")) .fontWeight(.regular) .font(.system(size: 12)) .foregroundColor(AllInColors.grey600Color) } VStack(){ Text("5") .fontWeight(.heavy) .font(.system(size: 15)) Text(String(localized: "drawer_nb_friends")) .fontWeight(.regular) .font(.system(size: 12)) .foregroundColor(AllInColors.grey600Color) } } } .padding(.leading, 10) } Text("Compte") .fontWeight(.bold) .font(.system(size: 16)) .padding(.leading, 13) .padding(.top, 35) VStack(spacing: 0) { ForEach(0..