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' />
|
<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'>
|
||||||
|
|
Loading…
Reference in a new issue