Merge branch 'profile-hover-staff-badges-fix' into 'develop'
ProfileHoverCard: fix redundant staff badges Closes #690 See merge request soapbox-pub/soapbox-fe!622
This commit is contained in:
commit
e978c1ca3b
1 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue