parent
44620c2a3f
commit
40ab139deb
6 changed files with 40 additions and 9 deletions
@ -1,14 +1,14 @@ |
|||||||
// Game mode actions and action creators.
|
// Game mode actions and action creators.
|
||||||
export const MODE_ACTION = 'MODE_ACTION'; |
export const MODE_ACTION = 'MODE_ACTION'; |
||||||
export const WELCOME = 'WELCOME'; |
export const WELCOME = 'MODE_WELCOME'; |
||||||
export const BOARD = 'BOARD'; |
export const BOARD = 'MODE_BOARD'; |
||||||
|
|
||||||
export const welcomeMode = () => ({ |
export const welcome = () => ({ |
||||||
type: MODE_ACTION, |
type: MODE_ACTION, |
||||||
action: WELCOME |
action: WELCOME |
||||||
}); |
}); |
||||||
|
|
||||||
export const boardMode = () => ({ |
export const board = () => ({ |
||||||
type: MODE_ACTION, |
type: MODE_ACTION, |
||||||
action: BOARD |
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