fix empty notifications and dynamize notifications tabs
This commit is contained in:
parent
c099e0d5ac
commit
e6483070ad
1 changed files with 4 additions and 1 deletions
|
|
@ -31,6 +31,7 @@
|
||||||
<section v-else class="notifications | flow">
|
<section v-else class="notifications | flow">
|
||||||
<template v-for="notification in notifications" :key="notification.id">
|
<template v-for="notification in notifications" :key="notification.id">
|
||||||
<router-link
|
<router-link
|
||||||
|
v-if="currentTab === 'all' || !notification.isRead"
|
||||||
:to="notification.page.uri + '?fileUuid=' + notification.file.uuid"
|
:to="notification.page.uri + '?fileUuid=' + notification.file.uuid"
|
||||||
>
|
>
|
||||||
<article
|
<article
|
||||||
|
|
@ -128,7 +129,9 @@ const tabs = computed(() => {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
const comments = Object.values(user.notifications.comments);
|
const comments = user?.notifications?.comments
|
||||||
|
? Object.values(user.notifications.comments)
|
||||||
|
: [];
|
||||||
|
|
||||||
const notifications = [...comments];
|
const notifications = [...comments];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue