Compare commits

...

1 Commits

Author SHA1 Message Date
Lucas DELANIER 9dd8751cc9 fix winning and loosing status
10 months ago

@ -82,9 +82,8 @@ struct ReviewCard: View {
.frame(width: .infinity) .frame(width: .infinity)
.padding(.all,2) .padding(.all,2)
.background(backgroundColor()) .background(backgroundColor())
.cornerRadius(20, corners: [.bottomLeft,.bottomRight]) .cornerRadius(20, corners: [.bottomLeft,.bottomRight])
.border(width: 1, edges: [.top], color: AllInColors.delimiterGrey)
} }
.onTapGesture { .onTapGesture {
showDetails.toggle() showDetails.toggle()
@ -93,14 +92,20 @@ struct ReviewCard: View {
} }
} }
private func backgroundColor() -> Color { private func backgroundColor() -> some View {
Group {
if bet.status == .finished && isWin {
AllInColors.primaryGradient
} else {
switch bet.status { switch bet.status {
case .inProgress, .waiting, .closing: case .inProgress, .waiting, .closing:
return AllInColors.grey50Color AllInColors.grey50Color
case .finished: case .finished:
return Color.black Color.black
case .cancelled: case .cancelled:
return Color.red Color.red
}
}
} }
} }
} }

Loading…
Cancel
Save