<commit_before>// Component for input of Twitter handle
var TwitterInput = React.createClass({
	componentDidMount: function() {
		// Focus on the input button when the page loads
		this.refs.nameInput.getDOMNode().focus(); 
	},
	_handleKeyPress: function(e) {
		// Call the onSubmit event when enter is pressed
		if (e.key === 'Enter') {
			this.props.onSubmit(this.refs.nameInput.getDOMNode().value);
		}
	},
	render: function () {
		return (
			<div className="statusInput">
				<h2>What is your Twitter username?</h2>
				<input type = "text" onKeyPress = {this._handleKeyPress} placeholder="@YourTwitterUsername" ref="nameInput" />
			</div>
		)
	}
});

// Component for input of Status
var StatusInput = React.createClass({
	// Focus on the input button when the page loads
	componentDidMount: function() {
		this.refs.statusInput.getDOMNode().focus(); 
	},
	_handleKeyPress: function(e) {
		// Call the onSubmit event when enter is pressed
		if (e.key === 'Enter') {
			this.props.onSubmit(this.refs.statusInput.getDOMNode().value);
			this.refs.statusInput.getDOMNode().value = "";
		}
	},
	render: function () {
		return (
			<div className="statusInput">
				<h2>What are you doing?</h2>
				<input type = "text" onKeyPress = {this._handleKeyPress} placeholder={this.props.placeholder} ref="statusInput" />
			</div>
		)
	}
});



var WorkingOn = React.createClass({

	// Set your Appbase credentials here
	getDefaultProps: function() {
		return {
			app_name: 'workingon',
			username: 'iiyvFcb3A',
			password: '<PASSWORD>',
			type: 'feed'
		};
	},

	// Checks if localstorage already exists otherwise update it with default value
	getInitialState: function(){
		if (localStorage.state){
			status = JSON.parse(localStorage.state).status
			twitterHandle = JSON.parse(localStorage.state).twitterHandle
		}
		// Setting the status with default Value
		else
		{
			status = "Mining Bitcoin"
			twitterHandle = ""
		}
		return {
			status: status,<commit_msg>Get the credentials from the config file<commit_after>// Component for input of Twitter handle
var TwitterInput = React.createClass({
	componentDidMount: function() {
		// Focus on the input button when the page loads
		this.refs.nameInput.getDOMNode().focus(); 
	},
	_handleKeyPress: function(e) {
		// Call the onSubmit event when enter is pressed
		if (e.key === 'Enter') {
			this.props.onSubmit(this.refs.nameInput.getDOMNode().value);
		}
	},
	render: function () {
		return (
			<div className="statusInput">
				<h2>What is your Twitter username?</h2>
				<input type = "text" onKeyPress = {this._handleKeyPress} placeholder="@YourTwitterUsername" ref="nameInput" />
			</div>
		)
	}
});

// Component for input of Status
var StatusInput = React.createClass({
	// Focus on the input button when the page loads
	componentDidMount: function() {
		this.refs.statusInput.getDOMNode().focus(); 
	},
	_handleKeyPress: function(e) {
		// Call the onSubmit event when enter is pressed
		if (e.key === 'Enter') {
			this.props.onSubmit(this.refs.statusInput.getDOMNode().value);
			this.refs.statusInput.getDOMNode().value = "";
		}
	},
	render: function () {
		return (
			<div className="statusInput">
				<h2>What are you doing?</h2>
				<input type = "text" onKeyPress = {this._handleKeyPress} placeholder={this.props.placeholder} ref="statusInput" />
			</div>
		)
	}
});

var WorkingOn = React.createClass({

	// Checks if localstorage already exists otherwise update it with default value
	getInitialState: function(){
		var self = this
		$.getJSON("./config.json", function(json) {
			console.log(json.appbase.app_name)
			self.props.app_name = json.appbase.app_name
			self.props.username = json.appbase.username
			self.props.password = <PASSWORD>
			self.props.type = json.appbase.type
		});

		if (localStorage.state){
			status = JSON.parse(localStorage.state).status
			twitterHandle = JSON.parse(localStorage.state).twitterHandle
		}
		// Setting the status with default Value
		else
		{
			status = "Mining Bitcoin"
			twitterHandle = ""
		}
		return {
			status: status,
{'fraction_non_alphanumeric': 0.135421805624075, 'fraction_numerical': 0.002220029600394672, 'mean_word_length': 3.7593896713615025, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '1582289', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1267, 'n_words': 319}