Skip to content

Commit

Permalink
fix(achievement): show badge on tooltips even when is false (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
wescopeland authored Apr 18, 2024
1 parent 04c0ef6 commit a0558f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Helpers/render/achievement.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ function achievementAvatar(
$tooltip = $tooltip !== false ? $achievement : false;
}

$iconUrl = $icon !== false && ($icon || !$label) ? $icon : null;

return avatar(
resource: 'achievement',
id: $id,
label: $label !== false && ($label || !$icon) ? $label : null,
link: route('achievement.show', $id),
tooltip: is_array($tooltip)
? renderAchievementCard($tooltip, iconUrl: $icon)
? renderAchievementCard($tooltip, iconUrl: $iconUrl)
: $tooltip,
iconUrl: $icon !== false && ($icon || !$label) ? $icon : null,
iconUrl: $iconUrl,
iconSize: $iconSize,
iconClass: $iconClass,
context: $context,
Expand Down

0 comments on commit a0558f2

Please sign in to comment.