diff --git a/PadelClub/Views/Navigation/Umpire/UmpireView.swift b/PadelClub/Views/Navigation/Umpire/UmpireView.swift index 21def8b..15303e1 100644 --- a/PadelClub/Views/Navigation/Umpire/UmpireView.swift +++ b/PadelClub/Views/Navigation/Umpire/UmpireView.swift @@ -54,9 +54,6 @@ struct UmpireView: View { AccountView(user: dataStore.user) { } } label: { AccountRowView(userName: dataStore.user.username) - if dataStore.user.email.isEmpty == false { - Text(dataStore.user.email) - } } } else { NavigationLink { @@ -223,7 +220,8 @@ struct UmpireView: View { } struct AccountRowView: View { - + @EnvironmentObject var dataStore: DataStore + var userName: String var body: some View { LabeledContent { @@ -235,6 +233,9 @@ struct AccountRowView: View { } } label: { Label("Mon compte", systemImage: "person.fill") + if dataStore.user.email.isEmpty == false { + Text(dataStore.user.email) + } } } }