add action and reducer for setting emailToVerify in the state

This commit is contained in:
Akinwale Ariwodola 2018-08-16 12:36:16 +01:00
parent 71fc9220e1
commit 6bac4425ac
5 changed files with 10650 additions and 160 deletions

909
dist/bundle.js vendored

File diff suppressed because it is too large Load diff

9886
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,7 @@ export {
doAuthenticate,
doUserFetch,
doUserEmailNew,
doUserEmailToVerify,
doUserEmailVerifyFailure,
doUserEmailVerify,
doFetchAccessToken,

View file

@ -93,6 +93,15 @@ export function doUserFetch() {
};
}
export function doUserEmailToVerify(email) {
return dispatch => {
dispatch({
type: ACTIONS.USER_EMAIL_VERIFY_SET,
data: { email },
});
};
}
export function doUserEmailNew(email) {
return dispatch => {
dispatch({

View file

@ -151,6 +151,11 @@ reducers[ACTIONS.USER_EMAIL_VERIFY_FAILURE] = (state, action) =>
emailVerifyErrorMessage: action.data.error,
});
reducers[ACTIONS.USER_EMAIL_VERIFY_SET] = (state, action) =>
Object.assign({}, state, {
emailToVerify: action.data.email,
});
reducers[ACTIONS.USER_IDENTITY_VERIFY_STARTED] = state =>
Object.assign({}, state, {
identityVerifyIsPending: true,