$w.onReady(function () {
let user = wixUsers.currentUser
let userID = user.id
let communityfounderID = $w('#dynamicDataset').getCurrentItem()['teamOwner']['_id']
//Show button if user is the owner
if (userID === communityfounderID) {
$w('#addproductbutton').show();
} else {
$w('#addproductbutton').hide();
}
});
$w.onReady( function () {
let user = wixUsers.currentUser
let userID = user.id
let communityfounderID = $w( ‘#dynamicDataset’ ).getCurrentItem()
//Show button if user is the owner
if (userID === communityfounderID._owner) {
$w( ‘#addproductbutton’ ).show();
} else {
$w( ‘#addproductbutton’ ).hide();
}
});