Files
habitica/website/client/store/actions/snackbars.js
T
Keith Holliday 506275c30e Oct 19 fixes (#9234)
* Add more checks for user achievements

* Began to add ajax request for bailey

* Prevented purchase of locked item

* Refactored notifications to have unique id and use actions

* Added feature banner when gear is bought

* Removed debug code

* Mark group notifications as read

* Fixed lint issues

* Added gem icon to purchase all
2017-10-20 15:22:13 +02:00

14 lines
385 B
JavaScript

import uuid from 'uuid';
export function add (store, payload) {
let notification = Object.assign({}, payload);
notification.uuid = uuid();
store.state.notificationStore.push(notification);
}
export function remove (store, payload) {
store.state.notificationStore = store.state.notificationStore.filter(notification => {
return notification.uuid !== payload.uuid;
});
}