Hi mate, this partially helped, adding in a “try” at least made it so the red text is hidden on the page loading but now it won’t show on a failed login!
Would you be able to help?
import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
$w.onReady(function(){
$w("#LoginError").hide();
$w('#loginNow').onClick(function (){
try{
let email = $w('#loginEmail').value;
let password = $w('#loginPassword').value;
wixUsers.login(email, password)
.then(()=>{
wixLocation.to('/members-area');
})
}
//Should show the error message if email/password not found
catch{
$w("#LoginError").show();
}
})
})