Fix react warning on notifications column (#1832)
parent
c2e24c8f5b
commit
c3ee35282d
|
@ -283,13 +283,14 @@ class Notifications extends React.PureComponent {
|
|||
if (canMarkAsRead) {
|
||||
extraButtons.push(
|
||||
<button
|
||||
key='mark-as-read'
|
||||
aria-label={intl.formatMessage(messages.markAsRead)}
|
||||
title={intl.formatMessage(messages.markAsRead)}
|
||||
onClick={this.handleMarkAsRead}
|
||||
className='column-header__button'
|
||||
>
|
||||
<Icon id='check' />
|
||||
</button>
|
||||
</button>,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -306,13 +307,14 @@ class Notifications extends React.PureComponent {
|
|||
|
||||
extraButtons.push(
|
||||
<button
|
||||
key='notif-cleaning'
|
||||
aria-label={msgEnterNotifCleaning}
|
||||
title={msgEnterNotifCleaning}
|
||||
onClick={this.onEnterCleaningMode}
|
||||
className={notifCleaningButtonClassName}
|
||||
>
|
||||
<Icon id='eraser' />
|
||||
</button>
|
||||
</button>,
|
||||
);
|
||||
|
||||
const notifCleaningDrawer = (
|
||||
|
@ -323,6 +325,12 @@ class Notifications extends React.PureComponent {
|
|||
</div>
|
||||
);
|
||||
|
||||
const extraButton = (
|
||||
<>
|
||||
{extraButtons}
|
||||
</>
|
||||
);
|
||||
|
||||
return (
|
||||
<Column
|
||||
bindToDocument={!multiColumn}
|
||||
|
@ -341,7 +349,7 @@ class Notifications extends React.PureComponent {
|
|||
pinned={pinned}
|
||||
multiColumn={multiColumn}
|
||||
localSettings={this.props.localSettings}
|
||||
extraButton={extraButtons}
|
||||
extraButton={extraButton}
|
||||
appendContent={notifCleaningDrawer}
|
||||
>
|
||||
<ColumnSettingsContainer />
|
||||
|
|
Loading…
Reference in New Issue