Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
super();
this.target = document.getElementById('AppFooter');
this.state = {
clicked: false,
visible: true,
added: 0,
};
this.ref = React.createRef();
this.moreButtonRef = React.createRef();
UIEvents.addListener(constants.SHOW_ADD_TO_CART_BAR, this.handleShow);
UIEvents.addListener(constants.HIDE_ADD_TO_CART_BAR, this.handleHide);
UIEvents.addListener(constants.INCREMENT_ACTION_COUNT, this.handleIncrement);
UIEvents.addListener(constants.DECREMENT_ACTION_COUNT, this.handleDecrement);
UIEvents.addListener(constants.RESET_ACTION_COUNT, this.handleReset);
}
this.target = document.getElementById('AppFooter');
this.state = {
clicked: false,
visible: true,
added: 0,
};
this.ref = React.createRef();
this.moreButtonRef = React.createRef();
UIEvents.addListener(constants.SHOW_ADD_TO_CART_BAR, this.handleShow);
UIEvents.addListener(constants.HIDE_ADD_TO_CART_BAR, this.handleHide);
UIEvents.addListener(constants.INCREMENT_ACTION_COUNT, this.handleIncrement);
UIEvents.addListener(constants.DECREMENT_ACTION_COUNT, this.handleDecrement);
UIEvents.addListener(constants.RESET_ACTION_COUNT, this.handleReset);
}
constructor() {
super();
this.target = document.getElementById('AppFooter');
this.state = {
clicked: false,
visible: true,
added: 0,
};
this.ref = React.createRef();
this.moreButtonRef = React.createRef();
UIEvents.addListener(constants.SHOW_ADD_TO_CART_BAR, this.handleShow);
UIEvents.addListener(constants.HIDE_ADD_TO_CART_BAR, this.handleHide);
UIEvents.addListener(constants.INCREMENT_ACTION_COUNT, this.handleIncrement);
UIEvents.addListener(constants.DECREMENT_ACTION_COUNT, this.handleDecrement);
UIEvents.addListener(constants.RESET_ACTION_COUNT, this.handleReset);
}
const observer = new MutationObserver((mutations) => {
const update = mutations
.filter(mutation => mutation.target.getAttribute(DATA_IGNORED) !== 'true').length > 0;
if (update) {
this.performFooterUpdate();
}
});
observer.observe(this.ref.current, {
attributes: true,
childList: true,
subtree: true,
});
UIEvents.addListener(SHEET_EVENTS.OPEN, this.hide);
UIEvents.addListener(SHEET_EVENTS.CLOSE, this.show);
}
constructor() {
super();
this.target = document.getElementById('AppFooter');
this.state = {
clicked: false,
visible: true,
added: 0,
};
this.ref = React.createRef();
this.moreButtonRef = React.createRef();
UIEvents.addListener(constants.SHOW_ADD_TO_CART_BAR, this.handleShow);
UIEvents.addListener(constants.HIDE_ADD_TO_CART_BAR, this.handleHide);
UIEvents.addListener(constants.INCREMENT_ACTION_COUNT, this.handleIncrement);
UIEvents.addListener(constants.DECREMENT_ACTION_COUNT, this.handleDecrement);
UIEvents.addListener(constants.RESET_ACTION_COUNT, this.handleReset);
}
super();
this.target = document.getElementById('AppFooter');
this.state = {
clicked: false,
visible: true,
added: 0,
};
this.ref = React.createRef();
this.moreButtonRef = React.createRef();
UIEvents.addListener(constants.SHOW_ADD_TO_CART_BAR, this.handleShow);
UIEvents.addListener(constants.HIDE_ADD_TO_CART_BAR, this.handleHide);
UIEvents.addListener(constants.INCREMENT_ACTION_COUNT, this.handleIncrement);
UIEvents.addListener(constants.DECREMENT_ACTION_COUNT, this.handleDecrement);
UIEvents.addListener(constants.RESET_ACTION_COUNT, this.handleReset);
}
const observer = new MutationObserver((mutations) => {
const update = mutations
.filter(mutation => mutation.target.getAttribute(DATA_IGNORED) !== 'true').length > 0;
if (update) {
this.performFooterUpdate();
}
});
observer.observe(this.ref.current, {
attributes: true,
childList: true,
subtree: true,
});
UIEvents.addListener(SHEET_EVENTS.OPEN, this.hide);
UIEvents.addListener(SHEET_EVENTS.CLOSE, this.show);
}