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
  • Loading branch information
esinx committed Aug 14, 2023
1 parent 85fbe71 commit 6e62096
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 6e62096

Please sign in to comment.