The NavigationLink needs also a title or label as an argument.
Also, you don't need to put a navigation link in a button because it's already a button.
This code would be correct:
NavigationLink("Back") {
ContentView()
}
Or this:
NavigationLink {
ContentView()
} label: {
Text("Back")
}
I hope it helps
The NavigationLink needs also a title or label as an argument.
Also, you don't need to put a navigation link in a button because it's already a button.
This code would be correct:
NavigationLink("Back") {
ContentView()
}
Or this:
NavigationLink {
ContentView()
} label: {
Text("Back")
}
I hope it helps