I have this wallet object that I use to do a lot in my app. I want to have a navigation from a login screen to go to here but every time it runs I get the tread 1: fatal error: No observableObject of type wallet found. I have an environmental object to the class call of type Wallet()
VStack{
headerView
ScrollView(.horizontal, showsIndicators: false){
HStack(spacing: 10){
ForEach(self.wallet.cards.indices, id:\
.self) { index in
CardView(card:
self.wallet.cards[index])
.onTapGesture {
self.wallet.cards.indices.forEach{ index in
self.wallet.cards[index].isSelected = false
}
self.wallet.cards[index].isSelected.toggle()
}
}
}
}
Spacer()
}