From 3136dd39eaed13a32bd4aa54415842e75bb8a2bd Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 6 Aug 2019 00:54:36 -0230 Subject: [PATCH] Only show notification expand icon when there are > 1 notifications that 'shouldBeRendered' (#6965) --- .../multiple-notifications.component.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/app/components/app/multiple-notifications/multiple-notifications.component.js b/ui/app/components/app/multiple-notifications/multiple-notifications.component.js index 95dbb5c9a..09020c467 100644 --- a/ui/app/components/app/multiple-notifications/multiple-notifications.component.js +++ b/ui/app/components/app/multiple-notifications/multiple-notifications.component.js @@ -16,21 +16,20 @@ export default class MultipleNotifications extends PureComponent { const { showAll } = this.state const { notifications, classNames = [] } = this.props + const notificationsToBeRendered = notifications.filter(notificationConfig => notificationConfig.shouldBeRendered) + return (
- {notifications - .filter(notificationConfig => notificationConfig.shouldBeRendered) - .map(notificationConfig => notificationConfig.component) - } + { notificationsToBeRendered.map(notificationConfig => notificationConfig.component) }
this.setState({ showAll: !showAll })} > - {notifications.length > 1 ? 1 ? : null}