diff --git a/src/routes/_components/NavItem.html b/src/routes/_components/NavItem.html
index 4f5f3fd2..e1c93cc6 100644
--- a/src/routes/_components/NavItem.html
+++ b/src/routes/_components/NavItem.html
@@ -5,22 +5,11 @@
rel="prefetch"
{href} >
- {#if name === 'notifications'}
-
-
- {#if $hasNotifications}
-
- {$numberOfNotifications}
-
- {/if}
-
- {:else}
-
- {/if}
+
{label}
diff --git a/src/routes/_components/NavItemIcon.html b/src/routes/_components/NavItemIcon.html
new file mode 100644
index 00000000..858866d9
--- /dev/null
+++ b/src/routes/_components/NavItemIcon.html
@@ -0,0 +1,85 @@
+{#if showBadge}
+
+
+
+ {badgeNumberToShow}
+
+
+{:else}
+
+{/if}
+
+
diff --git a/src/routes/_store/computations/timelineComputations.js b/src/routes/_store/computations/timelineComputations.js
index 45820cb9..eacf7d72 100644
--- a/src/routes/_store/computations/timelineComputations.js
+++ b/src/routes/_store/computations/timelineComputations.js
@@ -27,20 +27,15 @@ export function timelineComputations (store) {
})
store.compute('numberOfNotifications',
- [`timelineData_itemIdsToAdd`, 'currentInstance', 'currentTimeline'],
- (root, currentInstance, currentTimeline) => {
- return (
- currentTimeline !== 'notifications' &&
- root &&
- root[currentInstance] &&
- root[currentInstance].notifications &&
- root[currentInstance].notifications.length
- ) || 0
- }
+ [`timelineData_itemIdsToAdd`, 'currentInstance'],
+ (root, currentInstance) => (
+ (root && root[currentInstance] && root[currentInstance].notifications &&
+ root[currentInstance].notifications.length) || 0
+ )
)
store.compute('hasNotifications',
- ['numberOfNotifications'],
- (numberOfNotifications) => !!numberOfNotifications
+ ['numberOfNotifications', 'currentPage'],
+ (numberOfNotifications, currentPage) => currentPage !== 'notifications' && !!numberOfNotifications
)
}