Fix AvatarComposite and DisplayName referencing undefined props (#2222)

This commit is contained in:
Claire
2023-05-17 23:24:27 +02:00
committed by GitHub
parent 054df2d67e
commit 058898802a
2 changed files with 20 additions and 50 deletions

View File

@@ -9,7 +9,6 @@ export default class AvatarComposite extends React.PureComponent {
accounts: ImmutablePropTypes.list.isRequired,
animate: PropTypes.bool,
size: PropTypes.number.isRequired,
onAccountClick: PropTypes.func.isRequired,
};
static defaultProps = {
@@ -80,15 +79,7 @@ export default class AvatarComposite extends React.PureComponent {
};
return (
<a
href={account.get('url')}
target='_blank'
onClick={(e) => this.props.onAccountClick(account.get('acct'), e)}
title={`@${account.get('acct')}`}
key={account.get('id')}
>
<div style={style} data-avatar-of={`@${account.get('acct')}`} />
</a>
<div key={account.get('id')} style={style} data-avatar-of={`@${account.get('acct')}`} />
);
}