Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/navigation/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,11 @@ export class Nav extends React.Component {
(isProAdminEasyCreateGroup || isProInNavDesktop) && 'navItemLink-pro'
),
counterBadgeClassName: cx(
isNewNavActiveDesktop &&
!isProAdminEasyCreateGroup &&
!isProInNavDesktop &&
'navItem--counterBadge',
(isProAdminEasyCreateGroup || isProInNavDesktop) &&
'navItem--counterBadgeProMessages'
'navItem--counterBadgeProMessages',
isNewNavActiveDesktop &&
(!isProAdminEasyCreateGroup || !isProInNavDesktop) &&
'navItem--counterBadge'
),
icon: getMessagesIcon(),
hasUpdates: messages.unreadMessages > 0,
Expand All @@ -453,12 +452,11 @@ export class Nav extends React.Component {
(isProAdminEasyCreateGroup || isProInNavDesktop) && 'navItemLink-pro'
),
counterBadgeClassName: cx(
isNewNavActiveDesktop &&
!isProAdminEasyCreateGroup &&
!isProInNavDesktop &&
'navItem--counterBadge',
(isProAdminEasyCreateGroup || isProInNavDesktop) &&
'navItem--counterBadgeProNotifications'
'navItem--counterBadgeProNotifications',
isNewNavActiveDesktop &&
(!isProAdminEasyCreateGroup || !isProInNavDesktop) &&
'navItem--counterBadge'
),
icon: getNotificationsIcon(),
onClickAction:
Expand Down
21 changes: 20 additions & 1 deletion src/navigation/nav.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,23 @@ storiesOf('Site Chrome/Nav', module)
style={{ width: '100%' }}
media={{ isAtMediumUp: true, isAtLargeUp: true }}
/>
));
))
.add('authenticated with updated nav design with unread notifications', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this story, because it is nearly the same we already have.

const notifications = { ...navItems.notifications };
notifications.unreadNotifications = 1;
const items = { ...navItems, notifications };
return (
<TestNav
self={{
is_pro_admin: true,
...MOCK_MEMBER,
}}
navItems={items}
style={{ width: '100%' }}
media={{ isAtMediumUp: true, isAtLargeUp: true }}
isNewNavActive
isNewNavsOrder
isProInNavFFEnabled
/>
);
});