|
|
@@ -5,26 +5,18 @@ import { PersistenceRegistry } from '../storage';
|
|
5
|
5
|
|
|
6
|
6
|
import { PROFILE_UPDATED } from './actionTypes';
|
|
7
|
7
|
|
|
8
|
|
-const DEFAULT_STATE = {
|
|
9
|
|
- profile: {}
|
|
10
|
|
-};
|
|
11
|
|
-
|
|
12
|
8
|
const STORE_NAME = 'features/base/profile';
|
|
13
|
9
|
|
|
14
|
10
|
/**
|
|
15
|
11
|
* Sets up the persistence of the feature base/profile.
|
|
16
|
12
|
*/
|
|
17
|
|
-PersistenceRegistry.register(STORE_NAME, {
|
|
18
|
|
- profile: true
|
|
19
|
|
-});
|
|
|
13
|
+PersistenceRegistry.register(STORE_NAME);
|
|
20
|
14
|
|
|
21
|
15
|
ReducerRegistry.register(
|
|
22
|
|
- STORE_NAME, (state = DEFAULT_STATE, action) => {
|
|
|
16
|
+ STORE_NAME, (state = {}, action) => {
|
|
23
|
17
|
switch (action.type) {
|
|
24
|
18
|
case PROFILE_UPDATED:
|
|
25
|
|
- return {
|
|
26
|
|
- profile: action.profile
|
|
27
|
|
- };
|
|
|
19
|
+ return action.profile;
|
|
28
|
20
|
}
|
|
29
|
21
|
|
|
30
|
22
|
return state;
|