Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raymosun committed Jan 19, 2024
1 parent ba32f55 commit 25f6583
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/u/[handle].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ const getServerSidePropsFunc: GetServerSideProps = async ({ params, req, res })

const isSignedInUser = handleUser.uuid === user.uuid;

const attendances =
!handleUser.isAttendancePublic || isSignedInUser
? null
: (await UserAPI.getAttendancesForUserByUUID(token, user.uuid)).slice(0, 10);
let attendances = null;
if (!handleUser.isAttendancePublic || isSignedInUser)
attendances = (await UserAPI.getAttendancesForUserByUUID(token, user.uuid)).slice(0, 10);

// render UserProfilePage
return {
Expand Down

0 comments on commit 25f6583

Please sign in to comment.