I have a problem: I don´t know how to implement a NavigationLink into a Button -> I want to create a Button named "Order now" for a shopping app. Depending on the payment that was chosen by the user I want to show different views after the user clicks on the button.
Button(action: {
if self.cart.orders.count > 0 {
switch self.paymentOption {
case 0:
default:
break
}
} else {
self.confirmationAlert.toggle()
}
}) {
Text("Order now")
}
Thanks for your help in advance!