add diff hover to star count on a score
All checks were successful
deploy / deploy (push) Successful in 54s

This commit is contained in:
Lee 2023-10-29 18:48:51 +00:00
parent 7999640f24
commit 5447db55b8

@ -83,10 +83,20 @@ export default function Score({
}} }}
> >
{leaderboard.ranked ? ( {leaderboard.ranked ? (
<Tooltip>
<TooltipTrigger>
<div className="flex items-center justify-center gap-[2px]"> <div className="flex items-center justify-center gap-[2px]">
<StarIcon width={13} height={13} /> <StarIcon width={13} height={13} />
{leaderboard.stars.toFixed(2)} {leaderboard.stars.toFixed(2)}
</div> </div>
</TooltipTrigger>
<TooltipContent>
<div>
<p className="font-bold">Difficulty</p>
<p>{diffName}</p>
</div>
</TooltipContent>
</Tooltip>
) : ( ) : (
<p>{diffName}</p> <p>{diffName}</p>
)} )}