Clean up toast logic in AppActions
This commit is contained in:
@ -43,9 +43,13 @@ export default Actions({
|
|||||||
toast(args) {
|
toast(args) {
|
||||||
return {
|
return {
|
||||||
transform(state) {
|
transform(state) {
|
||||||
const id = state.toast && state.toast.id ? state.toast.id : 0;
|
return {
|
||||||
const toast = { ...args, id: id + 1 };
|
...state,
|
||||||
return { ...state, toast };
|
toast: {
|
||||||
|
...args,
|
||||||
|
id: state.toast && state.toast.id ? state.toast.id : 1
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user