Added a dummied attack button as a component
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { SET_ATTACK_DISABLED } from '../actions/combat.js';
|
||||
|
||||
const initialStore = {
|
||||
attackDisabled: true
|
||||
};
|
||||
|
||||
export function combatReducer(store = initialStore, action) {
|
||||
switch(action.type) {
|
||||
case SET_ATTACK_DISABLED: {
|
||||
let newStore = JSON.parse(JSON.stringify(initialStore));
|
||||
newStore.attackDisabled = action.disabled;
|
||||
return newStore;
|
||||
}
|
||||
|
||||
default:
|
||||
return store;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
import { combineReducers } from 'redux';
|
||||
import { accountReducer } from './accounts.js';
|
||||
import { combatReducer } from './combat.js';
|
||||
|
||||
//compile all reducers together
|
||||
export default combineReducers({
|
||||
account: accountReducer
|
||||
account: accountReducer,
|
||||
combat: combatReducer
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user