Hello. For a while now i am stuck to this. I want page redirect to diffrient page after user has logged in, but it is not working
import wixLocation from ‘wix-location’ ;
import wixUsers from ‘wix-users’ ;
let user = wixUsers.currentUser;
let userId = user.id;
$w.onReady( function () {
})
if ($w(wixUsers.currentUser.loggedIn)) {
$w( wixLocation.to( “/anketa-from-beginning” ));
}
else {
$w(wixUsers.promptLogin());
}