From 0f1b29c5c413bbf5b7758eaa9e05532e8dae4390 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 28 May 2024 09:22:50 +0200 Subject: [PATCH] Put the limit of the five tournaments to 2 in debug --- .../Navigation/Toolbox/APICallsListView.swift | 40 +++++++++++++++++++ PadelClub/Views/Subscription/StoreItem.swift | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 PadelClub/Views/Navigation/Toolbox/APICallsListView.swift diff --git a/PadelClub/Views/Navigation/Toolbox/APICallsListView.swift b/PadelClub/Views/Navigation/Toolbox/APICallsListView.swift new file mode 100644 index 0000000..3fc030f --- /dev/null +++ b/PadelClub/Views/Navigation/Toolbox/APICallsListView.swift @@ -0,0 +1,40 @@ +// +// APICallsView.swift +// PadelClub +// +// Created by Laurent Morvillier on 27/05/2024. +// + +import SwiftUI +import LeStorage + +struct APICallsListView: View { + + @State var collections: [String] = [] + + var body: some View { + + List { + ForEach(self.collections) { name in + NavigationLink(name) { + + } + } + }.onAppear { + self.collections = Store.main.collectionNames() + } + + } +} + +struct APICallsView: View { + + var body: some View { + + } + +} + +#Preview { + APICallsListView() +} diff --git a/PadelClub/Views/Subscription/StoreItem.swift b/PadelClub/Views/Subscription/StoreItem.swift index b0fc3d7..79bab93 100644 --- a/PadelClub/Views/Subscription/StoreItem.swift +++ b/PadelClub/Views/Subscription/StoreItem.swift @@ -12,7 +12,11 @@ enum StoreItem: String, Identifiable, CaseIterable { case fivePerMonth = "app.padelclub.tournament.subscription.five.per.month" case unit = "app.padelclub.tournament.unit" + #if DEBUG static let five: Int = 2 + #else + static let five: Int = 5 + #endif var id: String { return self.rawValue }