I am having trouble with navigation in SwiftUI. I have a button on a navigation bar, if clicked it pushes a new navigation view with list of items. When one of those items is tapped, it pushes a detail view.
But I am ending up with something like this.

Below is the code
struct FirstView: View {
var body: some View {
NavigationView {
List {
...
}
.navigationBarTitle(Text("First View"))
.navigationBarItems(trailing: MyButton())
}
}
}
struct MyButton: View {
var body: some View {
NavigationLink("SecondView", destination: SecondView())
}
}
struct SecondView: View {
var body: some View {
NavigationView {
Text("My View")
}
}
}

