Skip to content

Commit

Permalink
IOS-2456 Disable pending interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatovv committed Mar 26, 2024
1 parent 46f0699 commit 3c51f08
Showing 1 changed file with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ struct MembershipTeirView: View {

@Environment(\.colorScheme) private var colorScheme

var isPending: Bool {
userMembership.tier == tierToDisplay && userMembership.status != .active
}

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Spacer.fixedHeight(16)
Expand All @@ -35,7 +39,11 @@ struct MembershipTeirView: View {
}
}
.fixTappableArea()
.onTapGesture(perform: onTap)
.onTapGesture {
if !isPending {
onTap()
}
}
.padding(.horizontal, 16)
.frame(width: 192, height: 296)
.background(
Expand All @@ -51,11 +59,13 @@ struct MembershipTeirView: View {
}

var actionButton: some View {
if case .custom = tierToDisplay {
StandardButton(Loc.About.contactUs, style: .primaryMedium, action: onTap)
} else {
StandardButton(Loc.learnMore, style: .primaryMedium, action: onTap)
}
Group {
if case .custom = tierToDisplay {
StandardButton(Loc.About.contactUs, style: .primaryMedium, action: onTap)
} else {
StandardButton(Loc.learnMore, style: .primaryMedium, action: onTap)
}
}.disabled(isPending)
}

var info: some View {
Expand Down

0 comments on commit 3c51f08

Please sign in to comment.