From 402748f71f4f2923534c2dfb5d0c29a8b2a3694b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 15 Jul 2021 11:35:50 -0500 Subject: [PATCH] ProfileHoverCard: fix redundant staff badges --- app/soapbox/components/profile_hover_card.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js index 8d234aa4b..77b0f54b4 100644 --- a/app/soapbox/components/profile_hover_card.js +++ b/app/soapbox/components/profile_hover_card.js @@ -20,9 +20,17 @@ const getAccount = makeGetAccount(); const getBadges = (account) => { let badges = []; - if (isAdmin(account)) badges.push(); - if (isModerator(account)) badges.push(); - if (account.getIn(['patron', 'is_patron'])) badges.push(); + + if (isAdmin(account)) { + badges.push(); + } else if (isModerator(account)) { + badges.push(); + } + + if (account.getIn(['patron', 'is_patron'])) { + badges.push(); + } + return badges; };