fix these showing when they shouldn't
All checks were successful
Deploy Website / deploy (push) Successful in 5m35s
All checks were successful
Deploy Website / deploy (push) Successful in 5m35s
This commit is contained in:
parent
4eb96da1f1
commit
de05aceb9f
@ -36,6 +36,11 @@ export default function AddFriend({ player }: Props) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Database is not ready
|
||||||
|
if (settings == undefined || database == undefined) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// If the player is already a friend, don't show the button
|
// If the player is already a friend, don't show the button
|
||||||
if (isFriend || settings?.playerId == id) {
|
if (isFriend || settings?.playerId == id) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -36,7 +36,12 @@ export default function ClaimProfile({ playerId }: Props) {
|
|||||||
revalidatePath("/player/[...slug]");
|
revalidatePath("/player/[...slug]");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings?.playerId == playerId || settings == undefined) {
|
// Database is not ready
|
||||||
|
if (settings == undefined || database == undefined) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings?.playerId == playerId) {
|
||||||
return null; // Don't show the claim button if it's the same user.
|
return null; // Don't show the claim button if it's the same user.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user