<commit_before>let React = require("react");
let ReactDOM = require("react-dom");
let NotificationDropdown = require("./NotificationDropdown");
let NotificationApi = require("./NotificationApi");

function NotificationComponent(config) {
	
	let notApi = new NotificationApi();
	let userNotifications = notApi.getNotifications("console");

	userNotifications.then((result) => {
		this.reactComponent.setState({notificationList: result});
	}, function(error) {
		console.log(error);
	});
	// create bell and notificationList objects
	this.notificationList = [];

	this.reactClass = React.createClass({
		getInitialState: function() {
			return {
				notificationList: []
			}
		},
		render: function() {
			return (
				<div>
					<NotificationDropdown notificationList={this.state.notificationList}/>
				</div>
			);
		}
	});

	this.attachComponent = function(element) {
		if (!element) {
			throw new TypeError("missing required argument: element");
		}
		if (typeof element === "string") {
			element = document.querySelector(element);
		}
		if (!element) {
			throw new Error("Element could not be found");
		}
		this.reactComponent = ReactDOM.render(<this.reactClass/>, element);
	}

}


module.exports = (function() {
 	var instance;
 
    function createInstance(config) {
        var object = new NotificationComponent(config);
        return object;
    }
 
    return {
        getInstance: function (config) {
            if (!instance) {
                instance = createInstance(config);
            }
            return instance;
        }
    }; 
})();<commit_msg>just fixed some syntax issues<commit_after>let React = require("react");
let ReactDOM = require("react-dom");
let NotificationDropdown = require("./NotificationDropdown");
let NotificationApi = require("./NotificationApi");

function NotificationComponent(config) {
	
	let notApi = new NotificationApi();
	let userNotifications = notApi.getNotifications("console");

	userNotifications.then((result) => {
		this.reactComponent.setState({notificationList: result});
	}, function(error) {
		console.log(error);
	});
	
	this.reactClass = React.createClass({
		getInitialState: function() {
			return {
				notificationList: []
			}
		},
		render: function() {
			return (
				<div>
					<NotificationDropdown notificationList={this.state.notificationList}/>
				</div>
			);
		}
	});

	this.attachComponent = function(element) {
		if (!element) {
			throw new TypeError("missing required argument: element");
		}
		if (typeof element === "string") {
			element = document.querySelector(element);
		}
		if (!element) {
			throw new Error("Element could not be found");
		}
		this.reactComponent = ReactDOM.render(<this.reactClass/>, element);
	};

}


module.exports = (function() {
 	var instance;
 
    function createInstance(config) {
        var object = new NotificationComponent(config);
        return object;
    }
 
    return {
        getInstance: function (config) {
            if (!instance) {
                instance = createInstance(config);
            }
            return instance;
        }
    }; 
})();
{'fraction_non_alphanumeric': 0.13483870967741934, 'fraction_numerical': 0.0, 'mean_word_length': 3.318941504178273, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '7294411', 'n_tokens_mistral': 963, 'n_tokens_neox': 847, 'n_words': 188}