From 6db0c1e71b51b8246eec28b5cba5e1a7a766081d Mon Sep 17 00:00:00 2001 From: ivan-nikolaievskyi <53932976+ivan-nikolaievskyi@users.noreply.github.com> Date: Thu, 26 Sep 2019 13:23:02 +0300 Subject: [PATCH] fix(client): enable setting button when user profile is private (#36848) Co-authored-by: i.nikolaievskyi --- client/src/components/profile/Profile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/profile/Profile.js b/client/src/components/profile/Profile.js index 8b6db449e3..272c200182 100644 --- a/client/src/components/profile/Profile.js +++ b/client/src/components/profile/Profile.js @@ -54,7 +54,7 @@ function TakeMeToTheChallenges() { return Take me to the Challenges; } -function renderIsLocked(username) { +function renderIsLocked(username, isSessionUser) { return ( @@ -62,6 +62,7 @@ function renderIsLocked(username) { + {isSessionUser ? renderSettingsButton() : null}

{username} has not made their profile public. @@ -132,7 +133,7 @@ function Profile({ user, isSessionUser }) { } = user; if (isLocked) { - return renderIsLocked(username); + return renderIsLocked(username, isSessionUser); } return (