Merge from git
This commit is contained in:
@@ -2,6 +2,7 @@ export const myCasesActionTypes = {
|
||||
GETMYCASES: "GETMYCASES",
|
||||
SETMYCASES: "SETMYCASES",
|
||||
UPDATEMYCASES: "UPDATEMYCASES",
|
||||
SETMYCASESDETAILS: "SETMYCASESDETAILS",
|
||||
};
|
||||
|
||||
export const getMyCasesObj = () => (dispatch) => {
|
||||
@@ -16,3 +17,9 @@ export const setMyCases = (myCases) => (dispatch) => {
|
||||
myCases: myCases,
|
||||
});
|
||||
};
|
||||
export const setMyCasesDetails = (myCasesDetails) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: myCasesActionTypes.SETMYCASESDETAILS,
|
||||
myCasesDetails: myCasesDetails,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,14 +2,21 @@ import { myCasesActionTypes } from "./action";
|
||||
|
||||
const myCasesInitialState = {
|
||||
myCases: {},
|
||||
myCasesDetails: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = myCasesInitialState, action) {
|
||||
switch (action.type) {
|
||||
case myCasesActionTypes.SETMYCASES:
|
||||
return {
|
||||
...state,
|
||||
myCases: action.myCases,
|
||||
};
|
||||
case myCasesActionTypes.SETMYCASESDETAILS:
|
||||
return {
|
||||
...state,
|
||||
myCasesDetails: action.myCasesDetails,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user