about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2022-08-27 22:17:27 +0900
committerGitHub <noreply@github.com>2022-08-27 15:17:27 +0200
commit54d9a9c18a74a1ec766d8f611ad3ee11ab4c5422 (patch)
tree71d4091b174fd9e30a0c57b69296e36a2b6e0ed4 /app/javascript/flavours
parent978dd7e73c911441503ff803ffdce544ce50a33d (diff)
Fix react warning on notifications column (#1832)
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/features/notifications/index.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js
index 075e729b1..2682dd29b 100644
--- a/app/javascript/flavours/glitch/features/notifications/index.js
+++ b/app/javascript/flavours/glitch/features/notifications/index.js
@@ -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 />