<commit_before>import React, { Component } from 'react';
import { connect } from 'react-redux';

import { Row, Col } from 'antd';

import DirectoriesEditor from './Settings/DirectoriesEditor';

import { getSettingsForCategory } from '../actions/settings.actions';

class Settings extends Component {
    constructor(props){
        super(props);

    }

    componentWillMount(){
        this.props.getSettingsForCategory('directories');
    }

    render() {
        const { lastSavedSettingID, saveInProgress, settings } = this.props;
        return (
            <div >
                <Row>
                    <Col>
                        <h3>Directories</h3>
                    </Col>
                    <Col>
                        <DirectoriesEditor 
                            saveInProgress={saveInProgress}
                            lastSavedSettingID={lastSavedSettingID}
                            directories={settings.directories}/>
                    </Col>
                </Row>
            </div>
        );
    }
}

const mapStateToProps = (state)=>{
    const { settings } = state;
    return {
        saveInProgress: settings.saveInProgress,
        lastSavedSettingID: settings.lastSavedSettingID,
        settings: settings.settings
    }
}

const mapDispatchToProps = (dispatch)=>{
    return {
        getSettingsForCategory: (category)=>dispatch(getSettingsForCategory(category))
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Settings);<commit_msg>Added API action to the props.<commit_after>import React, { Component } from 'react';
import { connect } from 'react-redux';

import { Row, Col } from 'antd';

import DirectoriesEditor from './Settings/DirectoriesEditor';

import { getSettingsForCategory } from '../actions/settings.actions';

class Settings extends Component {
    constructor(props){
        super(props);

    }

    componentWillMount(){
        this.props.getSettingsForCategory('directories');
    }

    render() {
        const { lastAPIAction, lastSavedSettingID, saveInProgress, settings } = this.props;
        return (
            <div >
                <Row>
                    <Col>
                        <h3>Directories</h3>
                    </Col>
                    <Col>
                        <DirectoriesEditor 
                            saveInProgress={saveInProgress}
                            lastAPIAction={lastAPIAction}
                            lastSavedSettingID={lastSavedSettingID}
                            directories={settings.directories}/>
                    </Col>
                </Row>
            </div>
        );
    }
}

const mapStateToProps = (state)=>{
    const { settings } = state;
    return {
        saveInProgress: settings.saveInProgress,
        lastAPIAction: settings.lastAPIAction,
        lastSavedSettingID: settings.lastSavedSettingID,
        settings: settings.settings
    }
}

const mapDispatchToProps = (dispatch)=>{
    return {
        getSettingsForCategory: (category)=>dispatch(getSettingsForCategory(category))
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Settings);
{'fraction_non_alphanumeric': 0.1002220107833809, 'fraction_numerical': 0.0012686330478908975, 'mean_word_length': 1.8988970588235294, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 31, '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': '2743334', 'n_tokens_mistral': 815, 'n_tokens_neox': 791, 'n_words': 154}