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:
@ -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()
|
||||
|
Reference in New Issue
Block a user