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