2016-06-17 17:37:29 +00:00
|
|
|
import * as ActionTypes from '../constants/constants';
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
isPreferencesShowing: false
|
|
|
|
}
|
|
|
|
|
|
|
|
const preferences = (state = initialState, action) => {
|
|
|
|
switch (action.type) {
|
2016-06-17 18:31:33 +00:00
|
|
|
case ActionTypes.OPEN_PREFERENCES:
|
2016-06-17 17:37:29 +00:00
|
|
|
return {
|
2016-06-17 18:31:33 +00:00
|
|
|
isPreferencesShowing: true
|
|
|
|
}
|
|
|
|
case ActionTypes.CLOSE_PREFERENCES:
|
|
|
|
return {
|
|
|
|
isPreferencesShowing: false
|
2016-06-17 17:37:29 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
return state
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default preferences;
|