fix unreadNotification
This commit is contained in:
parent
4054c54e57
commit
d552b6bf5e
1 changed files with 6 additions and 5 deletions
|
|
@ -126,12 +126,13 @@ const { isEmptyBrief } = useProjectStore();
|
||||||
const { page } = storeToRefs(usePageStore());
|
const { page } = storeToRefs(usePageStore());
|
||||||
|
|
||||||
const unreadNotificationsCount = computed(() => {
|
const unreadNotificationsCount = computed(() => {
|
||||||
if (!user.value) return undefined;
|
if (!user.value) return 0;
|
||||||
|
|
||||||
const count =
|
const count =
|
||||||
notifications.value.filter((notification) => !notification.isRead).length ||
|
notifications.value?.filter((notification) => !notification.isRead)
|
||||||
0;
|
.length ?? 0;
|
||||||
if (count === 0) return undefined;
|
|
||||||
return count;
|
return count === 0 ? 0 : count;
|
||||||
});
|
});
|
||||||
|
|
||||||
const mainItems = [
|
const mainItems = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue