welsh changes
This commit is contained in:
@@ -11,6 +11,7 @@ export const currentViewActionTypes = {
|
||||
SETREPRESENTATIONMESSAGESENT: "SETREPRESENTATIONMESSAGESENT",
|
||||
SETREPRESENTATIONRESET: "SETREPRESENTATIONRESET",
|
||||
SETSHOWLOGIN: "SETSHOWLOGIN",
|
||||
SETLOCALE: "SETLOCALE",
|
||||
};
|
||||
|
||||
export const getCurrentViewObj = () => (dispatch) => {
|
||||
@@ -102,3 +103,10 @@ export const setShowReps = (showReps, showLogin) => (dispatch) => {
|
||||
showReps: showReps,
|
||||
});
|
||||
};
|
||||
|
||||
export const setLocale = (locale) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: currentViewActionTypes.SETLOCALE,
|
||||
locale: locale,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@ const currentViewInitialState = {
|
||||
currentPage: 1,
|
||||
showReps: false,
|
||||
showLogin: false,
|
||||
locale: "",
|
||||
};
|
||||
|
||||
export default function reducer(state = currentViewInitialState, action) {
|
||||
@@ -72,6 +73,11 @@ export default function reducer(state = currentViewInitialState, action) {
|
||||
showReps: action.showReps,
|
||||
showLogin: action.showLogin,
|
||||
};
|
||||
case currentViewActionTypes.SETLOCALE:
|
||||
return {
|
||||
...state,
|
||||
locale: action.locale,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user