Skip to content

Commit

Permalink
Merge pull request #64 from Noctember/fix/self-private-profile
Browse files Browse the repository at this point in the history
fix(profile): display stats when viewing own private profile
  • Loading branch information
stijnvdkolk authored May 6, 2024
2 parents b9563ff + b613475 commit 290f728
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/pages/user/[id]/[[...deeplink]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,15 @@ const User: NextPage<Props> = ({
};
}

const privateProfile = !(
user.privacySettings?.recentlyPlayed ||
user.privacySettings?.topTracks ||
user.privacySettings?.topAlbums ||
user.privacySettings?.topArtists ||
user.privacySettings?.topGenres ||
user.privacySettings?.streamStats
);
const privateProfile =
!(
user.privacySettings?.recentlyPlayed ||
user.privacySettings?.topTracks ||
user.privacySettings?.topAlbums ||
user.privacySettings?.topArtists ||
user.privacySettings?.topGenres ||
user.privacySettings?.streamStats
) && currentUser?.id !== user.id;

return (
<>
Expand Down

0 comments on commit 290f728

Please sign in to comment.