oops, fix pp change always showing
All checks were successful
Deploy / deploy (push) Successful in 2m43s

This commit is contained in:
Lee 2024-09-28 08:05:25 +01:00
parent 0b87f36ded
commit 737401f752

@ -33,14 +33,18 @@ const playerData = [
return ( return (
<div className="text-pp flex gap-1 items-center"> <div className="text-pp flex gap-1 items-center">
<p>{formatPp(player.pp)}pp</p> <p>{formatPp(player.pp)}pp</p>
<Tooltip display={<p>The change in your pp compared to yesterday</p>}> {player.ppChange != 0 && (
<p <Tooltip
className={`text-sm ${player.ppChange > 0 ? "text-green-400" : "text-red-400"}`} display={<p>The change in your pp compared to yesterday</p>}
> >
{player.ppChange > 0 ? "+" : ""} <p
{formatPp(player.ppChange)}pp className={`text-sm ${player.ppChange > 0 ? "text-green-400" : "text-red-400"}`}
</p> >
</Tooltip> {player.ppChange > 0 ? "+" : ""}
{formatPp(player.ppChange)}pp
</p>
</Tooltip>
)}
</div> </div>
); );
}, },