Commit 6a2dc9c1 authored by Dan Notestein's avatar Dan Notestein
Browse files

Merge branch 'fix-broken-hivebuzz-level-badge' into 'develop'

Hide Hivebuzz level badge if the image returns an error

See merge request !160
parents c6091fb8 fc5726f3
......@@ -47,6 +47,13 @@ class UserProfileHeader extends React.Component {
</DropdownMenu>
);
const hideHivebuzzLevelBadge = () => {
const badge = document.getElementById('hivebuzz-level-badge');
if (badge) {
badge.style.display = 'none';
}
};
return (
<div className="UserProfile__banner row expanded">
<div className="column" style={cover_image_style}>
......@@ -89,6 +96,8 @@ class UserProfileHeader extends React.Component {
}/level.png`}
alt="Hivebuzz level badge"
className="UserProfile__badge_image_hivebuzzlevel"
id="hivebuzz-level-badge"
onError={hideHivebuzzLevelBadge}
/>
</a>
</Tooltip>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment