From 19ca1db674bc0bd0d2e416c058b97093a9f3f538 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Thu, 31 Dec 2020 22:12:16 +0300 Subject: [PATCH] Tweak spelling of username on user page (#1175) Fixes #575 --- client/homebrew/pages/userPage/userPage.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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)}