fix empty notifications and dynamize notifications tabs

This commit is contained in:
isUnknown 2024-10-29 17:29:40 +01:00
parent c099e0d5ac
commit e6483070ad

View file

@ -31,6 +31,7 @@
<section v-else class="notifications | flow">
<template v-for="notification in notifications" :key="notification.id">
<router-link
v-if="currentTab === 'all' || !notification.isRead"
:to="notification.page.uri + '?fileUuid=' + notification.file.uuid"
>
<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];