cleanup
Some checks failed
Deploy Website / deploy (push) Has been cancelled

This commit is contained in:
Lee 2024-10-11 20:16:38 +01:00
parent 9f6a58e325
commit 306269f1f9

@ -92,15 +92,17 @@ const playerData = [
const statisticChange = player.statisticChange;
const rankChange = statisticChange?.today?.rank ?? 0;
return renderChange(
return (
<div className="text-gray-300 flex gap-1 items-center">
{renderChange(
player,
"rank",
<Link href={`/ranking/${player.rankPages.global}`}>
<div className="text-gray-300 flex gap-1 items-center">
<p className="hover:brightness-75 transition-all transform-gpu">#{formatNumberWithCommas(player.rank)}</p>
</Link>
)}
{rankChange != 0 && renderDailyChange(rankChange, <p>The change in your rank compared to yesterday</p>)}
</div>
</Link>
);
},
},
@ -113,18 +115,20 @@ const playerData = [
const statisticChange = player.statisticChange;
const rankChange = statisticChange?.today?.countryRank ?? 0;
return renderChange(
return (
<div className="text-gray-300 flex gap-1 items-center">
{renderChange(
player,
"countryRank",
<Link href={`/ranking/${player.country}/${player.rankPages.country}`}>
<div className="text-gray-300 flex gap-1 items-center">
<Link href={`/ranking/${player.country}/${player.rankPages.global}`}>
<p className="hover:brightness-75 transition-all transform-gpu">
#{formatNumberWithCommas(player.countryRank)}
</p>
</Link>
)}
{rankChange != 0 &&
renderDailyChange(rankChange, <p>The change in your country rank compared to yesterday</p>)}
</div>
</Link>
);
},
},
@ -134,15 +138,14 @@ const playerData = [
const statisticChange = player.statisticChange;
const ppChange = statisticChange?.today?.pp ?? 0;
return renderChange(
return (
<div className="text-gray-300 flex gap-1 items-center">
{renderChange(
player,
"pp",
<div className="text-pp flex gap-1 items-center">
<p>{formatPp(player.pp)}pp</p>
{ppChange != 0 &&
renderDailyChange(ppChange, <p>The change in your pp compared to yesterday</p>, number => {
return `${formatPp(number)}pp`;
})}
<p className="hover:brightness-75 transition-all transform-gpu text-pp">{formatPp(player.pp)}pp</p>
)}
{ppChange != 0 && renderDailyChange(ppChange, <p>The change in your pp compared to yesterday</p>)}
</div>
);
},