added create contact flow for registration

This commit is contained in:
2021-10-13 07:40:36 +01:00
parent 7238a79895
commit b34c56145d
22 changed files with 663 additions and 307 deletions
+11
View File
@@ -1,7 +1,11 @@
import actions from "redux-form/lib/actions";
export const AccountDetailsDataActionTypes = {
GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA",
SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA",
SETLOGGEDINUSER: "SETLOGGEDINUSER",
SETACCOUNTCREATED: "SETACCOUNTCREATED",
USER_LOGOUT: "USER_LOGOUT",
};
export const getAccountDetailsObj = () => (dispatch) => {
@@ -29,3 +33,10 @@ export const setLogout = () => (dispatch) => {
type: "USER_LOGOUT",
});
};
export const setAccCr = (accCr) => (dispatch) => {
return dispatch({
type: AccountDetailsDataActionTypes.SETACCOUNTCREATED,
accCr: accCr,
});
};
+6
View File
@@ -3,6 +3,7 @@ import { AccountDetailsDataActionTypes } from "./action";
const AccountDetailsDataInitialState = {
accountDetails: {},
loggedinUserId: "",
accCr: false,
};
export default function reducer(
@@ -20,6 +21,11 @@ export default function reducer(
...state,
loggedinUserId: action.loggedinUserId,
};
case AccountDetailsDataActionTypes.SETACCOUNTCREATED:
return {
...state,
accCr: action.accCr,
};
default:
return state;
}