fix player pp display and hide mini rankings on inactive/banned players
All checks were successful
Deploy Website / deploy (push) Successful in 3m22s
All checks were successful
Deploy Website / deploy (push) Successful in 3m22s
This commit is contained in:
parent
5e3ab8435b
commit
3f2dd7ea90
@ -79,7 +79,7 @@ export default function PlayerData({
|
|||||||
page={page}
|
page={page}
|
||||||
/>
|
/>
|
||||||
</article>
|
</article>
|
||||||
{!isMobile && (
|
{!isMobile && !player.inactive && !player.banned && (
|
||||||
<aside ref={miniRankingsRef} className="w-[600px] hidden 2xl:flex flex-col gap-2">
|
<aside ref={miniRankingsRef} className="w-[600px] hidden 2xl:flex flex-col gap-2">
|
||||||
<Mini shouldUpdate={isMiniRankingsVisible} type="Global" player={player} />
|
<Mini shouldUpdate={isMiniRankingsVisible} type="Global" player={player} />
|
||||||
<Mini shouldUpdate={isMiniRankingsVisible} type="Country" 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.inactive && <p className="text-gray-400">Inactive Account</p>}
|
||||||
{player.banned && <p className="text-red-500">Banned Account</p>}
|
{player.banned && <p className="text-red-500">Banned Account</p>}
|
||||||
</div>
|
</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) => {
|
{playerData.map((subName, index) => {
|
||||||
// Check if the player is inactive or banned and if the data should be shown
|
// Check if the player is inactive or banned and if the data should be shown
|
||||||
if (!subName.showWhenInactiveOrBanned && (player.inactive || player.banned)) {
|
if (!subName.showWhenInactiveOrBanned && (player.inactive || player.banned)) {
|
||||||
|
Reference in New Issue
Block a user