diff --git a/src/views/Notifications.vue b/src/views/Notifications.vue
index 51bf62a..9362a2c 100644
--- a/src/views/Notifications.vue
+++ b/src/views/Notifications.vue
@@ -31,7 +31,10 @@
stroke-linejoin="round"
/>
-
Vous n’avez pas de nouvelles notifications
+
+ Vous n’avez pas de nouvelles notifications
+
+ Vous n’avez pas de notifications non lues
{
- return [...notifications.value].sort((a, b) => {
+ const sortedNotifications = [...notifications.value].sort((a, b) => {
return dayjs(b.date).diff(dayjs(a.date));
});
+
+ if (currentTab.value === "unread") {
+ return sortedNotifications.filter(
+ (notification) => notification.isread !== "true"
+ );
+ }
+ return sortedNotifications;
});
function changeTab(newValue) {