Add snack action

This commit is contained in:
Jannis Mattheis 2018-03-31 18:53:15 +02:00 committed by Jannis Mattheis
parent 13d9350f6d
commit eced95bcc1
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import * as AppAction from './AppAction';
import * as UserAction from './UserAction'; import * as UserAction from './UserAction';
import * as MessageAction from './MessageAction'; import * as MessageAction from './MessageAction';
import * as ClientAction from './ClientAction'; import * as ClientAction from './ClientAction';
import dispatcher from '../stores/dispatcher';
/** Calls all actions to initialize the state. */ /** Calls all actions to initialize the state. */
export function initialLoad() { export function initialLoad() {
@ -13,3 +14,6 @@ export function initialLoad() {
UserAction.fetchUsers(); UserAction.fetchUsers();
} }
export function snack(message) {
dispatcher.dispatch({type: 'SNACK', payload: message});
}