diff --git a/app/javascript/mastodon/components/badge.jsx b/app/javascript/mastodon/components/badge.jsx index 646655c249..5e0b2587bd 100644 --- a/app/javascript/mastodon/components/badge.jsx +++ b/app/javascript/mastodon/components/badge.jsx @@ -7,8 +7,8 @@ import PersonIcon from '@/material-icons/400-24px/person.svg?react'; import SmartToyIcon from '@/material-icons/400-24px/smart_toy.svg?react'; -export const Badge = ({ icon, label, domain }) => ( -
+export const Badge = ({ icon, label, domain, roleId }) => ( +
{icon} {label} {domain && {domain}} @@ -19,6 +19,7 @@ Badge.propTypes = { icon: PropTypes.node, label: PropTypes.node, domain: PropTypes.node, + roleId: PropTypes.string }; Badge.defaultProps = { diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index ecb1108ded..e9d6071a21 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -408,7 +408,7 @@ class Header extends ImmutablePureComponent { } account.get('roles', []).forEach((role) => { - badges.push({role.get('name')}} domain={domain} />); + badges.push({role.get('name')}} domain={domain} roleId={role.get('id')} />); }); return (