read comment working
This commit is contained in:
parent
583daa1759
commit
39fc379541
12 changed files with 125 additions and 78 deletions
|
|
@ -10,5 +10,13 @@ export const useUserStore = defineStore("user", () => {
|
|||
: Object.values(user.value.notifications);
|
||||
});
|
||||
|
||||
return { user, notifications };
|
||||
function readNotification(notificationId) {
|
||||
user.value.notifications.forEach((notification) => {
|
||||
if (notification.id === notificationId) {
|
||||
notification.isRead = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return { user, notifications, readNotification };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue