add cookie consent manger & updated cookie banner
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import actions from "redux-form/lib/actions";
|
||||
|
||||
export const AccountDetailsDataActionTypes = {
|
||||
SETCOOKIECONSENT: "SETCOOKIECONSENT",
|
||||
GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA",
|
||||
SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA",
|
||||
SETLOGGEDINUSER: "SETLOGGEDINUSER",
|
||||
@@ -8,6 +7,14 @@ export const AccountDetailsDataActionTypes = {
|
||||
USER_LOGOUT: "USER_LOGOUT",
|
||||
};
|
||||
|
||||
export const setCookieConsent = (cookieObj) => (dispatch) => {
|
||||
console.log("wertyewrtyt", cookieObj);
|
||||
return dispatch({
|
||||
type: AccountDetailsDataActionTypes.SETCOOKIECONSENT,
|
||||
cookieObj: cookieObj,
|
||||
});
|
||||
};
|
||||
|
||||
export const getAccountDetailsObj = () => (dispatch) => {
|
||||
return dispatch({
|
||||
type: AccountDetailsDataActionTypes.GETACCOUNTDETAILSDATA,
|
||||
|
||||
@@ -4,6 +4,7 @@ const AccountDetailsDataInitialState = {
|
||||
accountDetails: {},
|
||||
loggedinUserId: "",
|
||||
accCr: false,
|
||||
cookieObj: "",
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
@@ -26,6 +27,11 @@ export default function reducer(
|
||||
...state,
|
||||
accCr: action.accCr,
|
||||
};
|
||||
case AccountDetailsDataActionTypes.SETCOOKIECONSENT:
|
||||
return {
|
||||
...state,
|
||||
cookieObj: action.cookieObj,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user