Buttons not working on SideMenuView

Hello good morning. I am trying to make an application and in the homescreen I have a SideBar and inside several buttons. I can not get the buttons to work. Also I get this error in console when I run it "NavigationLink presenting a value must appear inside a NavigationStack or NavigationSplitView. Link will be disabled." but I can't solve the error. I hope you can help me ContentView.swift: https://pastebin.com/gbYSHPis SideMenuView.swift https://pastebin.com/FBvrgLmn
Pastebin
ContentView.swift - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
SideMenuView.swift - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
3 Replies
ellocomen
ellocomen15mo ago
Fixed
outsharded
outsharded15mo ago
Could you post your fix for others?
ellocomen
ellocomen15mo ago
The problem was on the ".overlay(LinearGradient(gradient: Gradient(colors: [Color.blue.opacity(0.3), Color.purple.opacity(0.3)]), startPoint: .top, endPoint: .bottom))" Correct thing is : .overlay( LinearGradient(gradient: Gradient(colors: [Color.blue.opacity(0.2), Color.purple.opacity(0.2)]), startPoint: .top, endPoint: .bottom) .allowsHitTesting(false)
Want results from more Discord servers?
Add your server