Change view on completion

Hi

I have developed a view that manages three subviews: login, register and confirm code. Now I'm developing a separate view that manages all the subviews after login successful. The idea is that after login with success the new is pushed and the old is popped. I've tried with NavigationLink in the login subview but it seems that it doesn't like the isActive change in the rest response (ie in the completion). Here is the code:

Code Block
NavigationLink(
            destination: LoggedView(),
            isActive: self.$pushToLogged,
            label: {
                
            }
        ).hidden()



Code Block
func login() {
let lF = LoginServiceFacade()
            lF.loginMember(mobileNumber: mobileNumber, password: password, completion: {
                (response: LoginResponse?, error: ConnectionErrors?) in
self.pushToLogged = true
})
}


Any idea?

Thanks in advance