Update: fix pluralization for beer and brewery header like count

This commit is contained in:
Aaron William Po
2023-05-02 23:49:01 -04:00
parent b7b239a4a1
commit 196d09161a
2 changed files with 3 additions and 2 deletions

View File

@@ -86,7 +86,8 @@ const BeerInfoHeader: FC<BeerInfoHeaderProps> = ({ beerPost }) => {
<div> <div>
{(!!likeCount || likeCount === 0) && ( {(!!likeCount || likeCount === 0) && (
<span> <span>
Liked by {likeCount} user{likeCount !== 1 && 's'} Liked by {likeCount}
{likeCount !== 1 ? ' users' : ' user'}
</span> </span>
)} )}
</div> </div>

View File

@@ -72,7 +72,7 @@ const BreweryInfoHeader: FC<BreweryInfoHeaderProps> = ({ breweryPost }) => {
<div> <div>
{(!!likeCount || likeCount === 0) && ( {(!!likeCount || likeCount === 0) && (
<span> <span>
Liked by {likeCount} user{likeCount !== 1 && 's'} Liked by {likeCount} {likeCount === 1 ? 'user' : 'users'}
</span> </span>
)} )}
</div> </div>