Transferring all Actions to ListStore to regain unidirectional data flow for all stores. Other Stores only will store section-specific data e.g. filters.
23 lines
532 B
JavaScript
23 lines
532 B
JavaScript
import AppDispatcher from '../dispatcher/AppDispatcher';
|
|
import ActionTypes from '../constants/ActionTypes';
|
|
import reactAlert from '../utils/reactAlert';
|
|
import saveHero from '../utils/saveHero';
|
|
import AccountStore from '../stores/AccountStore';
|
|
|
|
var TabActions = {
|
|
openTab: function(tab) {
|
|
AppDispatcher.dispatch({
|
|
actionType: ActionTypes.SHOW_TAB,
|
|
tab
|
|
});
|
|
},
|
|
showSection: function(section) {
|
|
AppDispatcher.dispatch({
|
|
actionType: ActionTypes.SHOW_TAB_SECTION,
|
|
section
|
|
});
|
|
}
|
|
};
|
|
|
|
export default TabActions;
|