Fix my account graphical status

multistore
Laurent 1 year ago
parent 97594b7613
commit f2a14ed81d
  1. 6
      PadelClub/Views/Navigation/Umpire/UmpireView.swift

@ -234,8 +234,10 @@ struct AccountRowView: View {
var userName: String var userName: String
var body: some View { var body: some View {
let hasToken = Store.main.hasToken()
LabeledContent { LabeledContent {
if Store.main.hasToken() { if hasToken {
Text(self.userName) Text(self.userName)
} else if Store.main.userName() != nil { } else if Store.main.userName() != nil {
Image(systemName: "xmark.circle.fill") Image(systemName: "xmark.circle.fill")
@ -243,7 +245,7 @@ struct AccountRowView: View {
} }
} label: { } label: {
Label("Mon compte", systemImage: "person.fill") Label("Mon compte", systemImage: "person.fill")
if dataStore.user.email.isEmpty == false { if hasToken && dataStore.user.email.isEmpty == false {
Text(dataStore.user.email) Text(dataStore.user.email)
} }
} }

Loading…
Cancel
Save