fix player pp display and hide mini rankings on inactive/banned players
All checks were successful
Deploy Website / deploy (push) Successful in 3m22s

This commit is contained in:
Lee 2024-10-12 15:38:34 +01:00
parent 5e3ab8435b
commit 3f2dd7ea90
2 changed files with 2 additions and 2 deletions

@ -79,7 +79,7 @@ export default function PlayerData({
page={page}
/>
</article>
{!isMobile && (
{!isMobile && !player.inactive && !player.banned && (
<aside ref={miniRankingsRef} className="w-[600px] hidden 2xl:flex flex-col gap-2">
<Mini shouldUpdate={isMiniRankingsVisible} type="Global" player={player} />
<Mini shouldUpdate={isMiniRankingsVisible} type="Country" player={player} />

@ -177,7 +177,7 @@ export default function PlayerHeader({ player }: Props) {
{player.inactive && <p className="text-gray-400">Inactive Account</p>}
{player.banned && <p className="text-red-500">Banned Account</p>}
</div>
<div className="flex gap-2 flex-wrap justify-center items-center">
<div className="flex gap-2 flex-wrap justify-center items-center lg:justify-start lg:items-start">
{playerData.map((subName, index) => {
// Check if the player is inactive or banned and if the data should be shown
if (!subName.showWhenInactiveOrBanned && (player.inactive || player.banned)) {