The following code is not working. But user is getting logged in. User should be able to navigate to contact page after Login successful. There is no issue with login, but user is not getting navigated to contact page. Any help much appreciated
export function loginButton_click(event) {
let email = $w( “#email” ).value;
let password = $w( “#password” ).value;
console.log(email);
wixUsers.login(email, password)
.then( () => {
wixlocation. to(‘/contact’);
console.log( “User is logged in” );
} )
. catch ( (err) => {
console.log(err);
} );
}