aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2019-08-06 11:24:36 +0800
committerGitHub <noreply@github.com>2019-08-06 11:24:36 +0800
commit3136dd39eaed13a32bd4aa54415842e75bb8a2bd (patch)
treed312d8622d6aea91c4ff0c2245f999dae8949102 /ui
parent010e3927da0f98857c1703b9c568e91abce72db9 (diff)
downloadtangerine-wallet-browser-3136dd39eaed13a32bd4aa54415842e75bb8a2bd.tar.gz
tangerine-wallet-browser-3136dd39eaed13a32bd4aa54415842e75bb8a2bd.tar.zst
tangerine-wallet-browser-3136dd39eaed13a32bd4aa54415842e75bb8a2bd.zip
Only show notification expand icon when there are > 1 notifications that 'shouldBeRendered' (#6965)
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app/multiple-notifications/multiple-notifications.component.js9
1 files 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 (<div
className={classnames(...classNames, {
'home-notification-wrapper--show-all': showAll,
'home-notification-wrapper--show-first': !showAll,
})}
>
- {notifications
- .filter(notificationConfig => notificationConfig.shouldBeRendered)
- .map(notificationConfig => notificationConfig.component)
- }
+ { notificationsToBeRendered.map(notificationConfig => notificationConfig.component) }
<div
className="home-notification-wrapper__i-container"
onClick={() => this.setState({ showAll: !showAll })}
>
- {notifications.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', {
+ {notificationsToBeRendered.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', {
'flipped': !showAll,
})} /> : null}
</div>