<commit_before>import React from 'react';
import IceboxToolbar from '../containers/iceboxToolbar';
import VisibleIceboxList from '../containers/visibleIceboxList';

const Icebox = () => {
	const scrollChecker = () => {
		if (document.body.scrollTop > 72 || document.documentElement.scrollTop > 72) {
			document.getElementById('appheader').className = 'appheader-hidden';
			document.getElementById('icebox-toolbar').className = 'icebox-toolbar-scroll';
			document.getElementById('goTop').className = 'goTop-show';
		} else {
			document.getElementById('appheader').className = 'appheader';
			document.getElementById('icebox-toolbar').className = 'icebox-toolbar';
			document.getElementById('goTop').className = 'goTop';
		}
	};

	window.onscroll = function () {
		scrollChecker();
	};

	return (
		<div className="icebox-container">
			<IceboxToolbar />
			<VisibleIceboxList />
		</div>
	);
};

export default Icebox;<commit_msg>[pull] converts Icebox to class component and adds scroll event to lifecycle methods<commit_after>import React, { Component } from 'react';
import IceboxToolbar from '../containers/iceboxToolbar';
import VisibleIceboxList from '../containers/visibleIceboxList';

class Icebox extends Component {
	constructor(props) {
		super(props);
		this.scrollChecker = this.scrollChecker.bind(this);
	}
	componentDidMount() {
		document.addEventListener('scroll', this.scrollChecker);
	}
	componentWillUnmount() {
		document.removeEventListener('scroll', this.scrollChecker);
	}
	scrollChecker() {
		if (document.body.scrollTop > 72 || document.documentElement.scrollTop > 72) {
			document.getElementById('appheader').className = 'appheader-hidden';
			document.getElementById('icebox-toolbar').className = 'icebox-toolbar-scroll';
			document.getElementById('goTop').className = 'goTop-show';
		} else {
			document.getElementById('appheader').className = 'appheader';
			document.getElementById('icebox-toolbar').className = 'icebox-toolbar';
			document.getElementById('goTop').className = 'goTop';
		}
	}
	render() {
		return (
			<div className="icebox-container">
				<IceboxToolbar />
				<VisibleIceboxList />
			</div>
		);
	}
}

export default Icebox;
{'fraction_non_alphanumeric': 0.14606227106227107, 'fraction_numerical': 0.003663003663003663, 'mean_word_length': 5.035911602209945, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4520018', 'n_tokens_mistral': 693, 'n_tokens_neox': 632, 'n_words': 113}