1
0
forked from noxious/client

Improved receiving notifications

This commit is contained in:
2024-06-02 02:33:29 +02:00
parent 348b84e08b
commit 8329afe897
4 changed files with 21 additions and 10 deletions

View File

@ -12,8 +12,8 @@ export const useNotificationStore: StoreDefinition = defineStore('notifications'
addNotification(notification: Notification) {
this.notifications.push(notification);
},
removeNotification(index: number) {
this.notifications.splice(index, 1);
removeNotification(id: string) {
this.notifications = this.notifications.filter((notification: Notification) => notification.id !== id);
}
}
});