Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clickHandler = () => {
const { props } = this;
if (process.env.NODE_ENV === 'production') {
ScrollEvent.scrollEvent.register('begin', () => {
ReactGA.event({
category: 'Interactions',
action: 'Clicked Scroll Button',
label: `To [${props.href}]`,
});
});
} else {
// eslint-disable-next-line no-console
console.log(`Analytics disabled. clicked.`);
}
return props.onClick;
};
componentDidMount() {
Events.scrollEvent.register('begin', function() {
console.log('begin', arguments);
});
Events.scrollEvent.register('end', function() {
console.log('end', arguments);
});
}
componentDidMount () {
Events.scrollEvent.register('begin', function () {
console.log('begin', arguments)
})
Events.scrollEvent.register('end', function () {
console.log('end', arguments)
})
scrollSpy.update()
}
scrollToTop () {
async componentDidMount() {
Events.scrollEvent.register('begin', function (to, element) {
console.log("begin", arguments);
});
Events.scrollEvent.register('end', function (to, element) {
console.log("end", arguments);
});
scrollSpy.update();
window.addEventListener('scroll', this.handleScroll);
window.addEventListener("resize", this.updateClientSize);
this.updateClientSize();
let session = storage.get('session');
if (session) {
if (session.expired) {
//toastr.error('Your session is expired');
notify({type: 'error', message: 'Your session is expired'});
async componentDidMount() {
Events.scrollEvent.register('begin', function (to, element) {
console.log("begin", arguments);
});
Events.scrollEvent.register('end', function (to, element) {
console.log("end", arguments);
});
scrollSpy.update();
window.addEventListener('scroll', this.handleScroll);
window.addEventListener("resize", this.updateClientSize);
this.updateClientSize();
let session = storage.get('session');
componentDidMount() {
this._getBlock(this.props.height);
Events.scrollEvent.register("begin", () => {
//console.log("begin", arguments);
});
Events.scrollEvent.register("end", () => {
//console.log("end", arguments);
this.setState({scrollEnded: true});
});
}
componentDidMount() {
Events.scrollEvent.register('begin', function() {
console.log('begin', arguments);
});
Events.scrollEvent.register('end', function() {
console.log('end', arguments);
});
}
componentWillUnmount = () => {
Events.scrollEvent.remove('begin');
Events.scrollEvent.remove('end');
}
Events.scrollEvent.register('end', () => {
resolve();
Events.scrollEvent.remove('end');
});
componentDidMount() {
Events.scrollEvent.register('end', (section) => {
this.setState({
current: section
});
});
scrollSpy.update();
}