Hi, my website is not publishing correctly, I am editing code in a lightbox, the code works great in preview mode, (console.log and wixLocation.to), but when I publish it, it does not work, here is my code:
export function button2_click(event) {
console.log("Sign in button clicked")
$w('#text180').hide();
let email = $w("#email").value;
let password = $w("#password").value;
if ($w('#rememberMe').checked) {
var rememberMe = "checked"
}
wixUsers.login(email, password)
.then( () => {
console.log("User is logged in")
wixLocation.to("/popup-3iy76");
session.setItem("reload", wixLocation.url);
} )
.catch( (err) => {
console.log(err);
$w('#text180').text = err
$w('#text180').show
} );
I really appreciate any responses,
Thanks,
Alex