I created a registration form and it works well when users register they go to their page (dynamic “id”) but now I am trying to get users to be able to log in to their site (dynamic) with (* log in ) does anyone have any idea how I can do this?
Something like that but send it to “article> dataset” on their dynamic page
import wixUsers from ‘wix-users’ ;
import wixLocation from ‘wix-location’ ;
import wixWindow from ‘wix-window’ ;
$w.onReady( function () {
export function loginButton_click(event) {
let email = $w( “#email” ).value;
let password = $w( “#password” ).value;
wixUsers.login(email, password)
.then( () => {
console.log( “User is logged in” );
wixLocation.to( “/dynamicpage” ); ///???
} )
. catch ( (err) => {
console.log(err);
$w( “#errorMessage” ).show(); // You can delete this line if you are not going to add an error message. Use a regular text element set to ‘collapse on load’ from the Properties Panel.
}
);
});
});