Merge from git
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
export const AccountDetailsDataActionTypes = {
|
||||
SETCOOKIECONSENT: "SETCOOKIECONSENT",
|
||||
GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA",
|
||||
SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA",
|
||||
SETLOGGEDINUSER: "SETLOGGEDINUSER",
|
||||
SETACCOUNTCREATED: "SETACCOUNTCREATED",
|
||||
USER_LOGOUT: "USER_LOGOUT",
|
||||
};
|
||||
|
||||
export const setCookieConsent = (cookieObj) => (dispatch) => {
|
||||
console.log("wertyewrtyt", cookieObj);
|
||||
return dispatch({
|
||||
type: AccountDetailsDataActionTypes.SETCOOKIECONSENT,
|
||||
cookieObj: cookieObj,
|
||||
});
|
||||
};
|
||||
|
||||
export const getAccountDetailsObj = () => (dispatch) => {
|
||||
@@ -16,8 +28,22 @@ export const setAccountDetails = (accountDetails) => (dispatch) => {
|
||||
});
|
||||
};
|
||||
|
||||
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,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,6 +2,9 @@ import { AccountDetailsDataActionTypes } from "./action";
|
||||
|
||||
const AccountDetailsDataInitialState = {
|
||||
accountDetails: {},
|
||||
loggedinUserId: "",
|
||||
accCr: false,
|
||||
cookieObj: "",
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
@@ -14,6 +17,21 @@ export default function reducer(
|
||||
...state,
|
||||
accountDetails: action.accountDetails,
|
||||
};
|
||||
case AccountDetailsDataActionTypes.SETLOGGEDINUSER:
|
||||
return {
|
||||
...state,
|
||||
loggedinUserId: action.loggedinUserId,
|
||||
};
|
||||
case AccountDetailsDataActionTypes.SETACCOUNTCREATED:
|
||||
return {
|
||||
...state,
|
||||
accCr: action.accCr,
|
||||
};
|
||||
case AccountDetailsDataActionTypes.SETCOOKIECONSENT:
|
||||
return {
|
||||
...state,
|
||||
cookieObj: action.cookieObj,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user