Roles PLS

setupPage();

wixUsers.onLogin((user) => {

setupPage();

});

});

export function setupPage() {};

$w.onReady(function () {

var roleName;

let currentUser = wixUsers.currentUser;

currentUser.getRoles()

.then( (roles) => {

var firstRole = roles[0];

roleName = firstRole.name;

if(roleName === "Ec Wellbeing"){

$w('#button35').show();

}

})

})

$w.onReady(function () {

var roleName;

let currentUser = wixUsers.currentUser;

currentUser.getRoles()

.then( (roles) => {

var firstRole = roles[0];

roleName = firstRole.name;

if(roleName === "Family Link"){

$w('#button34').show();

}

})

})