cleanup
All checks were successful
deploy / deploy (push) Successful in 57s

This commit is contained in:
Lee
2023-10-22 10:50:10 +01:00
parent 85495bfc18
commit 2e93a1b27f
6 changed files with 29 additions and 59 deletions

View File

@ -46,17 +46,17 @@ export default function Navbar() {
return (
<>
<div className="flex h-fit w-full rounded-md bg-gray-800">
{settingsStore && settingsStore.profilePicture && (
{settingsStore !== undefined && settingsStore.player && (
<NavbarButton
text="You"
icon={
<Avatar
url={settingsStore.profilePicture}
url={settingsStore.player.profilePicture}
label="Your avatar"
size={32}
/>
}
href={`/player/${settingsStore.userId}`}
href={`/player/${settingsStore.player.id}`}
/>
)}

View File

@ -36,7 +36,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) {
const toastId: any = useRef(null);
async function claimProfile() {
settingsStore?.setUserId(playerId);
settingsStore?.setProfile(playerData);
addProfile(false);
}
@ -91,7 +91,7 @@ export default function PlayerInfo({ playerData }: PlayerInfoProps) {
}
}
const isOwnProfile = settingsStore?.userId == playerId;
const isOwnProfile = settingsStore.player?.id == playerId;
return (
<Card className="mt-2">

View File

@ -35,7 +35,7 @@ export default function PlayerRanking({
>
<p
className={
player.id == settingsStore?.userId
player.id == settingsStore.player?.id
? "transform-gpu text-red-500 transition-all hover:text-blue-500"
: ""
}

View File

@ -32,7 +32,7 @@ export default function PlayerRankingMobile({
)}
<p
className={
player.id == settingsStore?.userId
player.id == settingsStore.player?.id
? "transform-gpu text-red-500 transition-all hover:text-blue-500"
: ""
}