ProfileHoverCard: fix redundant staff badges
This commit is contained in:
parent
72b295da59
commit
402748f71f
1 changed files with 11 additions and 3 deletions
|
@ -20,9 +20,17 @@ const getAccount = makeGetAccount();
|
||||||
|
|
||||||
const getBadges = (account) => {
|
const getBadges = (account) => {
|
||||||
let badges = [];
|
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 (isAdmin(account)) {
|
||||||
if (account.getIn(['patron', 'is_patron'])) badges.push(<Badge key='patron' slug='patron' title='Patron' />);
|
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;
|
return badges;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue