parent
44620c2a3f
commit
40ab139deb
6 changed files with 40 additions and 9 deletions
@ -1,14 +1,14 @@ |
||||
// Game mode actions and action creators.
|
||||
export const MODE_ACTION = 'MODE_ACTION'; |
||||
export const WELCOME = 'WELCOME'; |
||||
export const BOARD = 'BOARD'; |
||||
export const WELCOME = 'MODE_WELCOME'; |
||||
export const BOARD = 'MODE_BOARD'; |
||||
|
||||
export const welcomeMode = () => ({ |
||||
export const welcome = () => ({ |
||||
type: MODE_ACTION, |
||||
action: WELCOME |
||||
}); |
||||
|
||||
export const boardMode = () => ({ |
||||
export const board = () => ({ |
||||
type: MODE_ACTION, |
||||
action: BOARD |
||||
}); |
||||
|
@ -0,0 +1,11 @@ |
||||
import * as ModeActions from '../actions/mode.actions'; |
||||
|
||||
let dispatch; |
||||
|
||||
const ModeCtrl = { |
||||
setDispatch: d => dispatch = d, |
||||
|
||||
welcome: () => dispatch(ModeActions.welcome()) |
||||
}; |
||||
|
||||
export default ModeCtrl; |
Loading…
Reference in new issue