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' /> <div className='notificationsBoxTriangle' />
<ul className='notifications'> <ul className='notifications'>
{!notifications && <li><Loading margin='30px auto' /></li>} {!notifications && <li><Loading margin='30px auto' /></li>}
{empty && <li className='notificationsEmpty'> {empty ? (
<li className='notificationsEmpty'>
You have no notifications. <br /> You have no notifications. <br />
More time for dancing. More time for dancing.
</li>} </li>
{notifications && notifications.slice(0, 10).map(n => { ) : (
return <Notification notification={n} notifications.slice(0, 10).map(n => <Notification notification={n}
markAsRead={markAsRead} markAsRead={markAsRead}
markAsUnread={markAsUnread} markAsUnread={markAsUnread}
key={`notification-${n.id}`} /> key={`notification-${n.id}`} />)
})} )}
</ul> </ul>
{notifications && !empty && <a href='/notifications' {notifications && !empty && <a href='/notifications'
className='notificationsBoxSeeAll'> className='notificationsBoxSeeAll'>