initial commit for welsh government planning appeals application
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export const progressActionTypes = {
|
||||
GETPROGRESS: "GETPROGRESS",
|
||||
SETPROGRESS: "SETPROGRESS",
|
||||
UPDATEPROGRESS: "UPDATEPROGRESS",
|
||||
};
|
||||
|
||||
export const getProgressObj = () => (dispatch) => {
|
||||
return dispatch({
|
||||
type: progressActionTypes.GETPROGRESS,
|
||||
});
|
||||
};
|
||||
|
||||
export const setProgress = (progress) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: progressActionTypes.SETPROGRESS,
|
||||
progressObj: progress,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import { progressActionTypes } from "./action";
|
||||
|
||||
const progressInitialState = {
|
||||
progress: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = progressInitialState, action) {
|
||||
switch (action.type) {
|
||||
case progressActionTypes.SETPROGRESS:
|
||||
return {
|
||||
progressObj: action.progressObj,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user