Refactor stateActions for better overview.

This commit is contained in:
Håvar Aambø Fosstveit
2019-11-05 11:53:21 +01:00
parent a9be34aea7
commit 8ab1475fea
31 changed files with 667 additions and 873 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import randomString from 'random-string';
import * as stateActions from './stateActions';
import * as notificationActions from './notificationActions';
// This returns a redux-thunk action (a function).
export const notify = ({ type = 'info', text, timeout }) =>
@@ -30,11 +30,11 @@ export const notify = ({ type = 'info', text, timeout }) =>
return (dispatch) =>
{
dispatch(stateActions.addNotification(notification));
dispatch(notificationActions.addNotification(notification));
setTimeout(() =>
{
dispatch(stateActions.removeNotification(notification.id));
dispatch(notificationActions.removeNotification(notification.id));
}, timeout);
};
};