Skip to content

Commit

Permalink
fix(club.membership_count): deprecate club membership count, use club…
Browse files Browse the repository at this point in the history
….members.length instead (#579)
  • Loading branch information
esinx authored Sep 1, 2023
1 parent 9707966 commit 7667459
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/components/ClubPage/InfoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const InfoBox = (props: InfoBoxProps): ReactElement | null => {
field: 'size',
icon: 'user',
alt: 'members',
text: `${props.club.membership_count} Registered (${getSizeDisplay(
props.club.size,
)})`,
text: `${
props.club.membership_count ?? props.club.members.length
} Registered (${getSizeDisplay(props.club.size)})`,
},
{
field: 'accepting_members',
Expand Down
4 changes: 4 additions & 0 deletions frontend/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ export interface Club {
linkedin: string
listserv: string
members: Membership[]
/**
* @deprecated
* use `members.length` instead
*/
membership_count: number
name: string
recruiting_cycle: ClubRecruitingCycle
Expand Down

0 comments on commit 7667459

Please sign in to comment.