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

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