Add unread notifications badge to the navigation bar
This commit is contained in:
@@ -46,6 +46,7 @@ const messages = defineMessages({
|
||||
// The component.
|
||||
export default function DrawerHeader ({
|
||||
columns,
|
||||
unreadNotifications,
|
||||
intl,
|
||||
onSettingsClick,
|
||||
}) {
|
||||
@@ -77,7 +78,12 @@ export default function DrawerHeader ({
|
||||
aria-label={intl.formatMessage(messages.notifications)}
|
||||
title={intl.formatMessage(messages.notifications)}
|
||||
to='/notifications'
|
||||
><Icon icon='bell' /></Link>
|
||||
>
|
||||
<span className='icon-badge-wrapper'>
|
||||
<Icon icon='bell' />
|
||||
{ unreadNotifications > 0 && <div className='icon-badge' />}
|
||||
</span>
|
||||
</Link>
|
||||
))}
|
||||
{renderForColumn('COMMUNITY', (
|
||||
<Link
|
||||
@@ -112,6 +118,7 @@ export default function DrawerHeader ({
|
||||
// Props.
|
||||
DrawerHeader.propTypes = {
|
||||
columns: ImmutablePropTypes.list,
|
||||
unreadNotifications: PropTypes.number,
|
||||
intl: PropTypes.object,
|
||||
onSettingsClick: PropTypes.func,
|
||||
};
|
||||
|
Reference in New Issue
Block a user