You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
PadelClub/PadelClub/Views/Navigation/Toolbox/APICallsListView.swift

43 lines
773 B

//
// 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) {
APICallsView(text: Store.main.apiCallsFile(resourceName: name))
}
}
}.onAppear {
self.collections = Store.main.collectionNames()
}
}
}
struct APICallsView: View {
var text: String
var body: some View {
List {
Text(self.text).lineLimit(nil)
}
}
}
#Preview {
APICallsListView()
}