Updated ProfilePage unavailable message for isLocked vs isBlocked
• Updated: - ProfilePage unavailable message for isLocked vs isBlocked
This commit is contained in:
parent
871502c197
commit
6fe9b69d95
@ -24,11 +24,13 @@ class ProfilePage extends ImmutablePureComponent {
|
|||||||
children,
|
children,
|
||||||
unavailable,
|
unavailable,
|
||||||
noSidebar,
|
noSidebar,
|
||||||
|
isBlocked,
|
||||||
params: { username },
|
params: { username },
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const nameHTML = !!account ? account.get('display_name_html') : ''
|
const nameHTML = !!account ? account.get('display_name_html') : ''
|
||||||
const name = !!account ? account.get('display_name_plain') : ''
|
const name = !!account ? account.get('display_name_plain') : ''
|
||||||
|
const unavailableMessage = (unavailable && isBlocked) ? <FormattedMessage id='empty_column.account_unavailable' defaultMessage='Profile unavailable' /> : <FormattedMessage id='empty_column.account_private' defaultMessage='This account is private. You must request to follow in order to view their page.' />
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfileLayout
|
<ProfileLayout
|
||||||
@ -47,9 +49,7 @@ class ProfilePage extends ImmutablePureComponent {
|
|||||||
{
|
{
|
||||||
unavailable &&
|
unavailable &&
|
||||||
<Block>
|
<Block>
|
||||||
<ColumnIndicator type='error' message={
|
<ColumnIndicator type='error' message={unavailableMessage} />
|
||||||
<FormattedMessage id='empty_column.account_unavailable' defaultMessage='Profile unavailable' />
|
|
||||||
} />
|
|
||||||
</Block>
|
</Block>
|
||||||
}
|
}
|
||||||
</ProfileLayout>
|
</ProfileLayout>
|
||||||
@ -72,6 +72,7 @@ const mapStateToProps = (state, { params: { username } }) => {
|
|||||||
const getAccount = makeGetAccount()
|
const getAccount = makeGetAccount()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isBlocked,
|
||||||
unavailable,
|
unavailable,
|
||||||
account: accountId !== -1 ? getAccount(state, accountId) : null,
|
account: accountId !== -1 ? getAccount(state, accountId) : null,
|
||||||
}
|
}
|
||||||
@ -84,6 +85,7 @@ ProfilePage.propTypes = {
|
|||||||
noSidebar: PropTypes.bool,
|
noSidebar: PropTypes.bool,
|
||||||
params: PropTypes.object.isRequired,
|
params: PropTypes.object.isRequired,
|
||||||
unavailable: PropTypes.bool.isRequired,
|
unavailable: PropTypes.bool.isRequired,
|
||||||
|
isBlocked: PropTypes.bool.isRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps)(ProfilePage)
|
export default connect(mapStateToProps)(ProfilePage)
|
Loading…
x
Reference in New Issue
Block a user