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