If you are looking to hide the login button after login, use the following code. You will need to change the element ids according to your page.
import wixLocation from 'wix-location';
import wixUsers from 'wix-users';
$w.onReady( function () {
if(wixUsers.currentUser.loggedIn === true) {
$w('#loginButton').hide();
} else {
$w("#loginButton").show();
}
});
function loginButton_click(event) {
let options = {"mode": "login"};
wixUsers.promptLogin(options)
.then( () => {
$w("#loginButton").hide();
})
.catch( (err) => {
//an error occured
});
}
The examples are exactly that ‘examples’. If you want to customize it according to your needs you will need to do it yourself.
You need to have a basic understanding of javascript and corvid to understand the code and how it is functioning. The wishlist example is a intermediate one, start with basics to learn how to code.