43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
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) => {
|
|
return dispatch({
|
|
type: AccountDetailsDataActionTypes.GETACCOUNTDETAILSDATA,
|
|
});
|
|
};
|
|
|
|
export const setAccountDetails = (accountDetails) => (dispatch) => {
|
|
return dispatch({
|
|
type: AccountDetailsDataActionTypes.SETACCOUNTDETAILSDATA,
|
|
accountDetails: accountDetails,
|
|
});
|
|
};
|
|
|
|
export const setLoggedInUserId = (loggedinUserId) => (dispatch) => {
|
|
return dispatch({
|
|
type: AccountDetailsDataActionTypes.SETLOGGEDINUSER,
|
|
loggedinUserId: loggedinUserId,
|
|
});
|
|
};
|
|
|
|
export const setLogout = () => (dispatch) => {
|
|
return dispatch({
|
|
type: "USER_LOGOUT",
|
|
});
|
|
};
|
|
|
|
export const setAccCr = (accCr) => (dispatch) => {
|
|
return dispatch({
|
|
type: AccountDetailsDataActionTypes.SETACCOUNTCREATED,
|
|
accCr: accCr,
|
|
});
|
|
};
|