0
0
Fork 0

Generalized the infinite scrollable list (#4697)

This commit is contained in:
abcang 2017-08-29 05:23:44 +09:00 committed by Eugen Rochko
parent 938cd2875b
commit 0827c09c44
8 changed files with 376 additions and 320 deletions

View file

@ -26,6 +26,7 @@ export default class Account extends ImmutablePureComponent {
onBlock: PropTypes.func.isRequired,
onMute: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
hidden: PropTypes.bool,
};
handleFollow = () => {
@ -41,12 +42,21 @@ export default class Account extends ImmutablePureComponent {
}
render () {
const { account, me, intl } = this.props;
const { account, me, intl, hidden } = this.props;
if (!account) {
return <div />;
}
if (hidden) {
return (
<div>
{account.get('display_name')}
{account.get('username')}
</div>
);
}
let buttons;
if (account.get('id') !== me && account.get('relationship', null) !== null) {