Merge pull request #5137 from vector-im/luke/fix-header-button-key-prop-warning

Remove `key` prop pass-thru on HeaderButton
pull/5140/head
Luke Barnard 2017-09-28 11:26:54 +01:00 committed by GitHub
commit bb64e9a18b
1 changed files with 2 additions and 6 deletions

View File

@ -45,13 +45,9 @@ class HeaderButton extends React.Component {
const TintableSvg = sdk.getComponent("elements.TintableSvg");
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
return <AccessibleButton
className="mx_RightPanel_headerButton"
key={this.props.key}
onClick={ this.onClick }
>
return <AccessibleButton className="mx_RightPanel_headerButton" onClick={this.onClick} >
<div className="mx_RightPanel_headerButton_badge">
{ this.props.badge ? this.props.badge : <span>&nbsp;</span>}
{ this.props.badge ? this.props.badge : <span>&nbsp;</span> }
</div>
<TintableSvg src={this.props.iconSrc} width="25" height="25"/>
{ this.props.isHighlighted ? <div className="mx_RightPanel_headerButton_highlight"></div> : <div/> }