Skip to content

Commit

Permalink
Merge pull request #9544 from hicommonwealth/israel.9543.proper-wordi…
Browse files Browse the repository at this point in the history
…ng-for-1-community

1 found community copy change
  • Loading branch information
Israellund authored Oct 15, 2024
2 parents 0b07365 + 86c501f commit c1a1516
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { pluralize } from 'helpers';
import numeral from 'numeral';

export const getCommunityCountsString = (totalCommunities: number) => {
return `${
const formattedCount =
totalCommunities >= 1000
? numeral(totalCommunities).format('0.0a')
: totalCommunities
} communities`;
: totalCommunities;

return pluralize(formattedCount, 'community');
};

0 comments on commit c1a1516

Please sign in to comment.