mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 13:37:51 +00:00
32 lines
631 B
JavaScript
32 lines
631 B
JavaScript
// @flow
|
|
|
|
import { ReducerRegistry } from '../redux';
|
|
import { PersistenceRegistry } from '../storage';
|
|
|
|
import { PROFILE_UPDATED } from './actionTypes';
|
|
|
|
const DEFAULT_STATE = {
|
|
profile: {}
|
|
};
|
|
|
|
const STORE_NAME = 'features/base/profile';
|
|
|
|
/**
|
|
* Sets up the persistence of the feature base/profile.
|
|
*/
|
|
PersistenceRegistry.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;
|
|
});
|