I have text button, and I want to use navigation link in this project, but it is not work when I click the button? Any idea?
@State var isLink = false
var body: some View {
GeometryReader { geometry in
ZStack {
NavigationLink(destination: SecondView(), isActive:
$isLink) {
Button() {
self.isLink = true
} label: {
Text("Button")
.padding()
.frame(width: 250, height: 50,
alignment: .center)
.foregroundColor(Color.white)
.background(Color("color"))
.clipShape(Capsule())
}}}}