-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve promotional offer button when pressed #4342
Improve promotional offer button when pressed #4342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks!
withAnimation(.easeInOut(duration: 0.3)) { | ||
loadingState = true | ||
} | ||
await viewModel.purchasePromo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure but this shouldn't trigger any errors right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are catching the error, and not doing anything with it atm, but that's from before this change, so that improvement should come in a different PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So smooth!
@@ -35,6 +35,7 @@ struct PromotionalOfferView: View { | |||
private var appearance: CustomerCenterConfigData.Appearance | |||
@Environment(\.colorScheme) | |||
private var colorScheme | |||
@State private var loadingState: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit suggestion for your consideration:
- @State private var loadingState: Bool = false
+ @State private var isLoading: Bool = false
Reported in #4335
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-02.at.16.44.56.mp4