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

28 lines
538 B
JavaScript
Raw Normal View History

// @flow
2018-01-17 11:19:10 +00:00
import { PersistencyRegistry, ReducerRegistry } from '../redux';
2018-01-29 22:20:38 +00:00
import { PROFILE_UPDATED } from './actionTypes';
const DEFAULT_STATE = {
profile: {}
};
const STORE_NAME = 'features/base/profile';
2018-01-17 11:19:10 +00:00
PersistencyRegistry.register(STORE_NAME, {
profile: true
});
ReducerRegistry.register(
STORE_NAME, (state = DEFAULT_STATE, action) => {
switch (action.type) {
case PROFILE_UPDATED:
return {
profile: action.profile
};
}
return state;
});