Navigation to another view in swiftUI

Hi everyone!
I’m from Russia, so sorry 4 my english :slight_smile:
Maybe somebody can help me, i’m stuck for 3 days…(
How can i make to switch to another view - profileuser, when i tap to it header hstack?
in one case - on search view tap is working with method -
@ObservedObject var usersViewModel = UsersViewModel()

ForEach(usersViewModel.users, id: .uid) { user in
NavigationLink(destination: UserProfileView(user: user))

but when i’m trying to do the same in other view
i’m taking “Type ‘()’ cannot conform to ‘View’; only struct/enum/class types can conform to protocols”
help please.

hello, it seems to are trying to navigate to a view but you are trying to “pass” the user which should not be the case, i suggest saving the user someplace else like maybe a global/separate swift file and just navigate to the view that you want normally