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