Home Reference Source

application/redux/actions/global-history-actions.js

/**
 * Action types
 */
export const GLOBAL_HISTORY_PUSH = 'GLOBAL_HISTORY_PUSH';
export const GLOBAL_HISTORY_POP = 'GLOBAL_HISTORY_POP';

/**
 * Action creators
 */
export function globalHistoryPush(object) {
    return function (dispatch, getState) {
        dispatch({
            type: GLOBAL_HISTORY_PUSH,
            payload: object
        });
        return Promise.resolve();
    }
}

export function globalHistoryPop(uuid = false) {
    return function (dispatch, getState) {
        dispatch({
            type: GLOBAL_HISTORY_POP,
            payload: uuid
        });
        return Promise.resolve();
    }
}