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