initial commit for welsh government planning appeals application
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { actionTypes } from "redux-form";
|
||||
|
||||
export const LPADataActionTypes = {
|
||||
GETLPADATA: "GETLPADATA",
|
||||
SETLPADATA: "SETLPADATA",
|
||||
};
|
||||
|
||||
export const getLPAObj = () => (dispatch) => {
|
||||
return dispatch({
|
||||
type: LPADataActionTypes.GETLPADATA,
|
||||
});
|
||||
};
|
||||
|
||||
export const setLPA = (lpaData) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: LPADataActionTypes.SETLPADATA,
|
||||
LPAData: lpaData,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
import { LPADataActionTypes } from "./action";
|
||||
|
||||
const LPADataInitialState = {
|
||||
LPAData: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = LPADataInitialState, action) {
|
||||
switch (action.type) {
|
||||
case LPADataActionTypes.SETLPADATA:
|
||||
return {
|
||||
...state,
|
||||
LPAData: action.LPAData,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user