ProfileHoverCard: fix redundant staff badges

This commit is contained in:
Alex Gleason 2021-07-15 11:35:50 -05:00
parent 72b295da59
commit 402748f71f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -20,9 +20,17 @@ const getAccount = makeGetAccount();
const getBadges = (account) => {
let badges = [];
if (isAdmin(account)) badges.push(<Badge key='admin' slug='admin' title='Admin' />);
if (isModerator(account)) badges.push(<Badge key='moderator' slug='moderator' title='Moderator' />);
if (account.getIn(['patron', 'is_patron'])) badges.push(<Badge key='patron' slug='patron' title='Patron' />);
if (isAdmin(account)) {
badges.push(<Badge key='admin' slug='admin' title='Admin' />);
} else if (isModerator(account)) {
badges.push(<Badge key='moderator' slug='moderator' title='Moderator' />);
}
if (account.getIn(['patron', 'is_patron'])) {
badges.push(<Badge key='patron' slug='patron' title='Patron' />);
}
return badges;
};