mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Extract props we don't want to pass to BaseAvatar
This commit is contained in:
parent
e5c1aeb14c
commit
c07057d1d4
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue