24 lines
717 B
JavaScript
24 lines
717 B
JavaScript
import { myRepresentationsActionTypes } from "./action";
|
|
|
|
const myRepresentationsInitialState = {
|
|
myRepresentations: {},
|
|
myRepresentationsDetails: {},
|
|
};
|
|
|
|
export default function reducer(state = myRepresentationsInitialState, action) {
|
|
switch (action.type) {
|
|
case myRepresentationsActionTypes.SETMYREPRESENTATIONS:
|
|
return {
|
|
...state,
|
|
myRepresentations: action.myRepresentations,
|
|
};
|
|
case myRepresentationsActionTypes.SETMYREPRESENTATIONSDETAILS:
|
|
return {
|
|
...state,
|
|
myRepresentationsDetails: action.myRepresentationsDetails,
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
}
|