diff --git a/client/homebrew/pages/userPage/userPage.jsx b/client/homebrew/pages/userPage/userPage.jsx index e0b371a7e..5081a4942 100644 --- a/client/homebrew/pages/userPage/userPage.jsx +++ b/client/homebrew/pages/userPage/userPage.jsx @@ -26,6 +26,11 @@ const UserPage = createClass({ brews : [] }; }, + getUsernameWithS : function() { + if(this.props.username.endsWith('s')) + return `${this.props.username}'`; + return `${this.props.username}'s`; + }, renderBrews : function(brews){ if(!brews || !brews.length) return
No Brews.
; @@ -57,11 +62,11 @@ const UserPage = createClass({
-

{this.props.username}'s brews

+

{this.getUsernameWithS()} brews

{this.renderBrews(brews.published)}
-

{this.props.username}'s unpublished brews

+

{this.getUsernameWithS()} unpublished brews

{this.renderBrews(brews.private)}