Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onWheel = e => {
- if (e.deltaY > 0) {
- this.props.history.push('/work');
- }
- };
- componentDidMount() {
- setTimeout(() => {
- window.addEventListener('wheel', this.onWheel);
- }, 500);
- }
- componentWillUnmount() {
- window.addEventListener('wheel', this.onWheel);
- }
- onWheel = e => {
- if (e.deltaY < 0) {
- this.props.history.push('/');
- }
- if (e.deltaY > 0) {
- this.props.history.push('/about');
- }
- }
- componentDidMount() {
- setTimeout(() => {
- window.addEventListener('wheel', this.onWheel);
- }, 500);
- }
- componentWillUnmount() {
- window.addEventListener('wheel', this.onWheel);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement