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.

reducer.js 608B

123456789101112131415161718192021222324252627282930
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { PersistenceRegistry } from '../base/storage';
  4. import { BLUR_ENABLED, BLUR_DISABLED } from './actionTypes';
  5. PersistenceRegistry.register('features/blur', true, {
  6. blurEnabled: false
  7. });
  8. ReducerRegistry.register('features/blur', (state = {}, action) => {
  9. switch (action.type) {
  10. case BLUR_ENABLED: {
  11. return {
  12. ...state,
  13. blurEnabled: true
  14. };
  15. }
  16. case BLUR_DISABLED: {
  17. return {
  18. ...state,
  19. blurEnabled: false
  20. };
  21. }
  22. }
  23. return state;
  24. });