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.

12345678910111213141516171819202122232425262728293031
  1. // @flow
  2. import {
  3. HIDE_APP_SETTINGS,
  4. SHOW_APP_SETTINGS
  5. } from './actionTypes';
  6. import { ReducerRegistry } from '../base/redux';
  7. const DEFAULT_STATE = {
  8. visible: false
  9. };
  10. ReducerRegistry.register(
  11. 'features/app-settings', (state = DEFAULT_STATE, action) => {
  12. switch (action.type) {
  13. case HIDE_APP_SETTINGS:
  14. return {
  15. ...state,
  16. visible: false
  17. };
  18. case SHOW_APP_SETTINGS:
  19. return {
  20. ...state,
  21. visible: true
  22. };
  23. }
  24. return state;
  25. });