#34 - hide notif count if no unread notif
This commit is contained in:
parent
bc64db15f9
commit
6b8871784e
1 changed files with 5 additions and 2 deletions
|
|
@ -160,8 +160,11 @@ function collapse() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function notificationCount() {
|
function notificationCount() {
|
||||||
return user.value.notifications.map((notification) => notification.isRead)
|
const count = user.value.notifications.map(
|
||||||
.length;
|
(notification) => notification.isRead
|
||||||
|
).length;
|
||||||
|
if (count === 0) return undefined;
|
||||||
|
return count;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue