<commit_before>import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import SideBar from '../components/SideBar.jsx';
import Login from '../components/Login.jsx';

function mapStateToProps(state) {
    const { login } = state;
    return {
        
    };
}

class App extends Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
        const { dispatch } = this.props;
        dispatch(login)
    }

    render() {
        return(
            <div id="container"> 
                <SideBar/>
                <Login connId="1"/>
            </div> 
        );
    }
}

// ReactDOM.render(<App/>, document.getElementById('app'));

export default connect(mapStateToProps)(App)<commit_msg>Added function to map state and dispatch to the props<commit_after>import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'
import SideBar from '../components/SideBar.jsx';
import Login from '../components/Login.jsx';
import * as LoginActions from '../actions/login';

class App extends Component {
    constructor(props) {
        super(props);
    }


    render() {
        const { login, actions } = this.props;
        return(
            <div id="container"> 
                <SideBar/>
                <Login connId="1"/>
            </div> 
        );
    }
}

function mapStateToProps(state) {
    return {
        login: state.login
    };
}

function mapDispatchToProps(dispatch) {
    return {
        actions: bindActionCreators(LoginActions, dispatch)
    };
}

export default connect(mapStateToProps, mapDispatchToProps)(App)
{'fraction_non_alphanumeric': 0.12724117987275882, 'fraction_numerical': 0.001156737998843262, 'mean_word_length': 2.41897233201581, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '4987224', 'n_tokens_mistral': 497, 'n_tokens_neox': 481, 'n_words': 122}