Skip to content

Commit

Permalink
fixing highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Darguima committed Jan 26, 2024
1 parent 5e09d04 commit dd42bca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Badge: React.FC<BadgeProps> = ({
const [badgeLoaded, setBadgeLoaded] = useState(false);
const [badge404, setBadge404] = useState(false);

const highlightBadge = owned || !disableOwnedHighlight || !badgeLoaded;
const highlightBadge = owned || disableOwnedHighlight || !badgeLoaded;

return (
<div
Expand All @@ -50,7 +50,7 @@ const Badge: React.FC<BadgeProps> = ({
src={avatar}
alt={name}
onLoad={() => setBadgeLoaded(true)}
onError={() => setBadge404(true)}
onError={() => { setBadge404(true); setBadgeLoaded(true); }}
hidden={!badgeLoaded || badge404}
/>
</div>
Expand Down

0 comments on commit dd42bca

Please sign in to comment.