multistore
Laurent 2 years ago
parent 9d6e9a9c4f
commit 3a9a075035
  1. 10
      PadelClub/Views/Subscription/SubscriptionInfoView.swift

@ -10,14 +10,11 @@ import TipKit
struct SubscriptionInfoView: View { struct SubscriptionInfoView: View {
var payment: Tournament.TournamentPayment? = .free @State var payment: Tournament.TournamentPayment? = .free
init() {
self.payment = Guard.main.paymentForNewTournament()
}
var body: some View { var body: some View {
Group {
switch self.payment { switch self.payment {
case .free: case .free:
TipView(FreeTournamentTip()).tipStyle(tint: nil, background: .blue.opacity(0.2)) TipView(FreeTournamentTip()).tipStyle(tint: nil, background: .blue.opacity(0.2))
@ -26,6 +23,9 @@ struct SubscriptionInfoView: View {
default: default:
EmptyView() EmptyView()
} }
}.onAppear {
self.payment = Guard.main.paymentForNewTournament()
}
} }

Loading…
Cancel
Save