2016-06-22 19:58:23 +00:00
|
|
|
import * as ActionTypes from '../../../constants';
|
2016-05-11 20:13:17 +00:00
|
|
|
|
|
|
|
const initialState = {
|
2016-06-23 22:29:55 +00:00
|
|
|
isPlaying: false
|
|
|
|
};
|
2016-05-11 20:13:17 +00:00
|
|
|
|
|
|
|
const ide = (state = initialState, action) => {
|
2016-06-23 22:29:55 +00:00
|
|
|
switch (action.type) {
|
|
|
|
case ActionTypes.TOGGLE_SKETCH:
|
|
|
|
return {
|
|
|
|
isPlaying: !state.isPlaying
|
|
|
|
};
|
|
|
|
case ActionTypes.START_SKETCH:
|
|
|
|
return {
|
|
|
|
isPlaying: true
|
|
|
|
};
|
|
|
|
case ActionTypes.STOP_SKETCH:
|
|
|
|
return {
|
|
|
|
isPlaying: false
|
|
|
|
};
|
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|
2016-05-11 20:13:17 +00:00
|
|
|
|
2016-06-23 22:29:55 +00:00
|
|
|
export default ide;
|