You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
375 B

import { MODE, ACTIONS } from './Constants.js';
export const modeReducer = (state = MODE.WELCOME, action) => {
if (action.type === ACTIONS.NEXT) {
switch (state) {
case MODE.BOARD:
return MODE.WELCOME;
case MODE.WELCOME:
return MODE.BOARD;
};
}
else {
return MODE.WELCOME;
}
};