mirror of https://github.com/vector-im/riot-web
Extract props we don't want to pass to BaseAvatar
parent
e5c1aeb14c
commit
c07057d1d4
|
@ -49,13 +49,15 @@ export default React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
|
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 (
|
return (
|
||||||
<BaseAvatar
|
<BaseAvatar
|
||||||
name={this.props.groupId[1]}
|
name={this.props.groupId[1]}
|
||||||
idName={this.props.groupId}
|
idName={this.props.groupId}
|
||||||
url={this.getGroupAvatarUrl()}
|
url={this.getGroupAvatarUrl()}
|
||||||
{...this.props}
|
{...otherProps}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue