<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Chat from '../Chat';
import ChatOnline from '../ChatOnline';
import { sendMessage } from '../../../actions';
import { chatIcon } from '../../../img/chat.png';

function mapStateToProps(state) {
  return {
    messages: state.playlist.messages,
    users: state.playlist.users,
    username: state.auth.username,
  };
}

const mapDispatchToProps = (dispatch, ownProps) => ({
  sendMessage: (message) => {
    dispatch(sendMessage(message, ownProps.id));
  },
});

class ChatContainer extends React.Component {
  componentDidUpdate(prevProps) {
    if (prevProps.messages.length && this.props.messages.length > prevProps.messages.length) {
      const newMessage = [...this.props.messages].pop();
      if (newMessage.user.username !== this.props.username) {
        const options = {
          body: `${newMessage.user.username}: ${newMessage.message}`,
          icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAWCAYAAAAxSueLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNC8xMC8xNMmEH5sAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAACPElEQVRIiZ2VMZbTMBCGv+RtQYc5wYYTrLkADm5o8CPptltzApIbZE+woaTCOQHep15rlXTejjK5gdPRhUIjLBzFcXbe85Mljeaf0fwzGh0OB0KSpNkEmAFTIAIS2doBW6ACSqNVHTQQkFEXLEmzCFgDdwNtGGBltKouAkvSbAYUwGtZ2mMjqGUEiOWbAteerW9Gq8UgsCTNcuCHB7ICCqNVc+qwOLf2QDdGq7wXTPJTS0Q7YDY0F4FrnxutypDuWMaVAO2B6SVJN1o1Es2zLK1P6Tow59XaaLUdCtSRmYzXcr1HMnr/4dMUeJL5WweWpNkCS4SF0ao5N5czNXAjtgyQ+867yOxuCxQBD9iIF+fmnglHpj/YuqyTNIuDYEIUxNMCS/fi3NwzEcn4HSixPKicXcfGRjbujVYrXiBJmk1p0zE3WpVJmv3E5nJjtMpdZI6qCz/sC8WxcOdRfynjHfxP/T1t2IMBkzSLkjSraInxL4fCgVr0pmNvMRcdB7gSIvQB5WLMNelNoKD37mdIb4yxLIuxBIiBCce9MZhvjw9vTnX92jO0pO0wITHYWjvqOl6/rY1W764CQEXH44eOjV/YOqqwZbANeSB5d6S5B7jq6BTA58DZHfAb+Ai8Am772pqUgauzwuVx3NGrvP9n4BH4YrSaALfY673Bdoa1z1phpZs/CVBJS//jl7pPvDaV96g90t7OHpvP4mIwDzQGvtK+2k4a2pbly9xoVb4IrMeJCNst/CdmCyyNVs1f0AcWcVDaseIAAAAASUVORK5CYII=',<commit_msg>Removed chat icon<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Chat from '../Chat';
import ChatOnline from '../ChatOnline';
import { sendMessage } from '../../../actions';

function mapStateToProps(state) {
  return {
    messages: state.playlist.messages,
    users: state.playlist.users,
    username: state.auth.username,
  };
}

const mapDispatchToProps = (dispatch, ownProps) => ({
  sendMessage: (message) => {
    dispatch(sendMessage(message, ownProps.id));
  },
});

class ChatContainer extends React.Component {
  componentDidUpdate(prevProps) {
    if (prevProps.messages.length && this.props.messages.length > prevProps.messages.length) {
      const newMessage = [...this.props.messages].pop();
      if (newMessage.user.username !== this.props.username) {
        const options = {
          body: `${newMessage.user.username}: ${newMessage.message}`,
          icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAWCAYAAAAxSueLAAAABHNCSVQ<KEY>zAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNC8xMC8xNMmEH5sAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAACPElEQVRIiZ2VMZbTMBCGv+RtQYc5wYYTrLkADm5o8CPptltzApIbZE+woaTCOQHep15rlXTejjK5gdPRhUIjLBzFcXbe85Mljeaf0fwzGh0OB0KSpNkEmAFTIAIS2doBW6ACSqNVHTQQkFEXLEmzCFgDdwNtGGBltKouAkvSbAYUwGtZ2mMjqGUEiOWbAteerW9Gq8UgsCTNcuCHB7ICCqNVc+qwOLf2QDdGq7wXTPJTS0Q7YDY0F4FrnxutypDuWMaVAO2B6SVJN1o1Es2zLK1P6Tow59XaaLUdCtSRmYzXcr1HMnr/4dMUeJL5WweWpNkCS4SF0ao5N5czNXAjtgyQ+867yOxuCxQBD9iIF+fmnglHpj/YuqyTNIuDYEIUxNMCS/fi3NwzEcn4HSixPKicXcfGRjbujVY<KEY>
{'fraction_non_alphanumeric': 0.09736477115117892, 'fraction_numerical': 0.052704576976421634, 'mean_word_length': 7.049107142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3429469', 'n_tokens_mistral': 1803, 'n_tokens_neox': 1702, 'n_words': 131}