struct History: View {
var busId : String
var body: some View {
ZStack{
ScrollView(.vertical, showsIndicators: false){
VStack(alignment: .leading){
Text("Something")
}
}
}
}
class getHistory: ObservableObject {
@Published var data = [history]()
init() {
let db = Firestore.firestore()
db.collection("Bus").document(/* Here i want to implement busId, but i can't. Please help me */).collection("Tanggal").addSnapshotListener{(snap, error) in
}
}
}
}
struct history: Identifiable {
var id : String
var day : String
}