the code:
function button9_click(event) {
import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
$w.onReady(function () {
});
xport
function button9_click() {
wixLocation.to("/home")
wixUsers.logout();
}
the part import wixUsers from ‘wix-users’; isnt correct… but how to fix it?
code source:
https://support.totallycodable.com/en/article/create-log-out-button-with-redirect-to-another-page-using-wix-code