|
|
@ -18,21 +18,27 @@ export default class MultipleNotifications extends PureComponent { |
|
|
|
|
|
|
|
|
|
|
|
const notificationsToBeRendered = notifications.filter(notificationConfig => notificationConfig.shouldBeRendered) |
|
|
|
const notificationsToBeRendered = notifications.filter(notificationConfig => notificationConfig.shouldBeRendered) |
|
|
|
|
|
|
|
|
|
|
|
return (<div |
|
|
|
if (notificationsToBeRendered.length === 0) { |
|
|
|
className={classnames(...classNames, { |
|
|
|
return null |
|
|
|
'home-notification-wrapper--show-all': showAll, |
|
|
|
} |
|
|
|
'home-notification-wrapper--show-first': !showAll, |
|
|
|
|
|
|
|
})} |
|
|
|
return ( |
|
|
|
> |
|
|
|
|
|
|
|
{ notificationsToBeRendered.map(notificationConfig => notificationConfig.component) } |
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
className="home-notification-wrapper__i-container" |
|
|
|
className={classnames(...classNames, { |
|
|
|
onClick={() => this.setState({ showAll: !showAll })} |
|
|
|
'home-notification-wrapper--show-all': showAll, |
|
|
|
|
|
|
|
'home-notification-wrapper--show-first': !showAll, |
|
|
|
|
|
|
|
})} |
|
|
|
> |
|
|
|
> |
|
|
|
{notificationsToBeRendered.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', { |
|
|
|
{ notificationsToBeRendered.map(notificationConfig => notificationConfig.component) } |
|
|
|
'flipped': !showAll, |
|
|
|
<div |
|
|
|
})} /> : null} |
|
|
|
className="home-notification-wrapper__i-container" |
|
|
|
|
|
|
|
onClick={() => this.setState({ showAll: !showAll })} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{notificationsToBeRendered.length > 1 ? <i className={classnames('fa fa-sm fa-sort-amount-asc', { |
|
|
|
|
|
|
|
'flipped': !showAll, |
|
|
|
|
|
|
|
})} /> : null} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|