feat: Ability to view stations from the API

Addition of a single component for stations; creation of structure; creation of function to retrieve bikes in real time
This commit is contained in:
2023-09-02 17:19:40 +02:00
parent 752a1f8b32
commit 701d163547
7 changed files with 222 additions and 6 deletions

View File

@ -9,16 +9,20 @@ import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
NavigationView {
ScrollView {
ForEach(velibStations, id: \.stationcode) { station in
StationComponent(station: station)
.padding(.bottom, 16)
}
}
.navigationBarTitle("Stations Vélib")
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()