Extract props we don't want to pass to BaseAvatar

pull/21833/head
David Baker 2017-06-30 16:05:19 +01:00
parent e5c1aeb14c
commit c07057d1d4
1 changed files with 3 additions and 1 deletions

View File

@ -49,13 +49,15 @@ export default React.createClass({
render: function() {
const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
// extract the props we use from props so we can pass any others through
const {groupId, groupAvatarUrl, wifth, height, resizeMethod, ...otherProps} = this.props;
return (
<BaseAvatar
name={this.props.groupId[1]}
idName={this.props.groupId}
url={this.getGroupAvatarUrl()}
{...this.props}
{...otherProps}
/>
);
}