role action

i created “Manager” role. and i want to dispaly a “bb” button if the “Manager” is logged in
this is my code but something not working… please help me

import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
import wixData from ‘wix-data’;

$w.onReady( function () {

let user = wixUsers.currentUser;
.then( (roles) => {
let firstRole = roles[0];
let roleName =;
} );

if (user.roleName ===“Manager” && user.loggedIn){
//Show components: