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>;
|
return <CurrentChallengeLink>Take me to the Challenges</CurrentChallengeLink>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderIsLocked(username) {
|
function renderIsLocked(username, isSessionUser) {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
@ -62,6 +62,7 @@ function renderIsLocked(username) {
|
|||||||
</Helmet>
|
</Helmet>
|
||||||
<Spacer size={2} />
|
<Spacer size={2} />
|
||||||
<Grid>
|
<Grid>
|
||||||
|
{isSessionUser ? renderSettingsButton() : null}
|
||||||
<FullWidthRow>
|
<FullWidthRow>
|
||||||
<h2 className='text-center'>
|
<h2 className='text-center'>
|
||||||
{username} has not made their profile public.
|
{username} has not made their profile public.
|
||||||
@ -132,7 +133,7 @@ function Profile({ user, isSessionUser }) {
|
|||||||
} = user;
|
} = user;
|
||||||
|
|
||||||
if (isLocked) {
|
if (isLocked) {
|
||||||
return renderIsLocked(username);
|
return renderIsLocked(username, isSessionUser);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
Reference in New Issue
Block a user