jiti-meet/react/features/base/profile/reducer.js

27 lines
573 B
JavaScript
Raw Normal View History

// @flow
import { ReducerRegistry } from '../redux';
import { PersistenceRegistry } from '../storage';
2018-01-29 22:20:38 +00:00
import { PROFILE_UPDATED } from './actionTypes';
const STORE_NAME = 'features/base/profile';
/**
* Sets up the persistence of the feature base/profile.
*/
PersistenceRegistry.register(STORE_NAME);
2018-01-17 11:19:10 +00:00
ReducerRegistry.register(
STORE_NAME, (state = {}, action) => {
switch (action.type) {
case PROFILE_UPDATED:
return {
...state,
...action.profile
};
}
return state;
});