add mock api calls for modules viewall component

This commit is contained in:
2021-07-29 14:46:09 +01:00
parent 777df3f907
commit 2b14eaaf1f
30 changed files with 884 additions and 112 deletions
+18
View File
@@ -0,0 +1,18 @@
export const myCasesActionTypes = {
GETMYCASES: "GETMYCASES",
SETMYCASES: "SETMYCASES",
UPDATEMYCASES: "UPDATEMYCASES",
};
export const getMyCasesObj = () => (dispatch) => {
return dispatch({
type: myCasesActionTypes.GETMYCASES,
});
};
export const setMyCases = (myCases) => (dispatch) => {
return dispatch({
type: myCasesActionTypes.SETMYCASES,
myCases: myCases,
});
};
+16
View File
@@ -0,0 +1,16 @@
import { myCasesActionTypes } from "./action";
const myCasesInitialState = {
myCases: {},
};
export default function reducer(state = myCasesInitialState, action) {
switch (action.type) {
case myCasesActionTypes.SETMYCASES:
return {
myCases: action.myCases,
};
default:
return state;
}
}