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 538B

123456789101112131415161718192021222324252627
  1. // @flow
  2. import { PersistencyRegistry, ReducerRegistry } from '../redux';
  3. import { PROFILE_UPDATED } from './actionTypes';
  4. const DEFAULT_STATE = {
  5. profile: {}
  6. };
  7. const STORE_NAME = 'features/base/profile';
  8. PersistencyRegistry.register(STORE_NAME, {
  9. profile: true
  10. });
  11. ReducerRegistry.register(
  12. STORE_NAME, (state = DEFAULT_STATE, action) => {
  13. switch (action.type) {
  14. case PROFILE_UPDATED:
  15. return {
  16. profile: action.profile
  17. };
  18. }
  19. return state;
  20. });