fix(client): enable setting button when user profile is private (#36848)
Co-authored-by: i.nikolaievskyi <ivan.nikolaievskyi@leaseplan.com>
This commit is contained in:
committed by
mrugesh
parent
5b8ed8637e
commit
6db0c1e71b
@ -54,7 +54,7 @@ function TakeMeToTheChallenges() {
|
||||
return <CurrentChallengeLink>Take me to the Challenges</CurrentChallengeLink>;
|
||||
}
|
||||
|
||||
function renderIsLocked(username) {
|
||||
function renderIsLocked(username, isSessionUser) {
|
||||
return (
|
||||
<Fragment>
|
||||
<Helmet>
|
||||
@ -62,6 +62,7 @@ function renderIsLocked(username) {
|
||||
</Helmet>
|
||||
<Spacer size={2} />
|
||||
<Grid>
|
||||
{isSessionUser ? renderSettingsButton() : null}
|
||||
<FullWidthRow>
|
||||
<h2 className='text-center'>
|
||||
{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 (
|
||||
<Fragment>
|
||||
|
Reference in New Issue
Block a user