I have the following:
ScrollView(.horizontal, showsIndicators: false) {
HStack {
ForEach(events) { event in
VStack {
Image(event.image)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 100, height: 100)
.padding(55)
NavigationLink(destination: PostView()) {
Text(event.name)
.font(.system(.headline))
.padding(.bottom,20)
}
}
.padding()
.border(Color.black, width: 4)
.cornerRadius(10)
}
}
}
But the NavigationLink NavigationLink(destination: PostView()) {
doesn't take me to the correct view?
Ii have tried wrapping the NavigationLink around the each VStack but that also doesn't take me to the view