refactor for clarity

This commit is contained in:
Connor Turland 2017-09-29 13:06:33 -04:00
parent 8695297a0f
commit 5e6fb6290c

View file

@ -33,16 +33,17 @@ class NotificationBox extends Component {
<div className='notificationsBoxTriangle' />
<ul className='notifications'>
{!notifications && <li><Loading margin='30px auto' /></li>}
{empty && <li className='notificationsEmpty'>
You have no notifications. <br />
More time for dancing.
</li>}
{notifications && notifications.slice(0, 10).map(n => {
return <Notification notification={n}
markAsRead={markAsRead}
markAsUnread={markAsUnread}
key={`notification-${n.id}`} />
})}
{empty ? (
<li className='notificationsEmpty'>
You have no notifications. <br />
More time for dancing.
</li>
) : (
notifications.slice(0, 10).map(n => <Notification notification={n}
markAsRead={markAsRead}
markAsUnread={markAsUnread}
key={`notification-${n.id}`} />)
)}
</ul>
{notifications && !empty && <a href='/notifications'
className='notificationsBoxSeeAll'>