refactor for clarity
This commit is contained in:
parent
8695297a0f
commit
5e6fb6290c
1 changed files with 11 additions and 10 deletions
|
@ -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'>
|
||||
{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}
|
||||
</li>
|
||||
) : (
|
||||
notifications.slice(0, 10).map(n => <Notification notification={n}
|
||||
markAsRead={markAsRead}
|
||||
markAsUnread={markAsUnread}
|
||||
key={`notification-${n.id}`} />
|
||||
})}
|
||||
key={`notification-${n.id}`} />)
|
||||
)}
|
||||
</ul>
|
||||
{notifications && !empty && <a href='/notifications'
|
||||
className='notificationsBoxSeeAll'>
|
||||
|
|
Loading…
Reference in a new issue