#34 - hide notif count if no unread notif

This commit is contained in:
isUnknown 2024-12-17 14:09:53 +01:00
parent bc64db15f9
commit 6b8871784e

View file

@ -160,8 +160,11 @@ function collapse() {
}
function notificationCount() {
return user.value.notifications.map((notification) => notification.isRead)
.length;
const count = user.value.notifications.map(
(notification) => notification.isRead
).length;
if (count === 0) return undefined;
return count;
}
</script>