<commit_before>var React = require('react');

var RecentStore = require('../../../stores/RecentStore');
var StoreWatchMixin = require('../../../mixins/StoreWatchMixin');

var Paginator = require('../../../components/Paginator');

/**
 * Displays recent media.
 */

var RecentMedia = React.createClass({

    propTypes: {
        type: React.PropTypes.string.isRequired,
        renderItem: React.PropTypes.func.isRequired
    },

    mixins: [StoreWatchMixin(RecentStore)],

    getStateFromStore: function() {
        return {
            media: RecentStore.getRecent(this.props.type)
        };
    },

    render: function() {
        var type = this.props.type;
        var renderItem = this.props.renderItem;

        return (
            <div className="module module-recent">
                <p className="module--title">Recent {type.charAt(0).toUpperCase() + type.slice(1)}</p>
                <div className="module-recent--list">
                    <Paginator items={this.state.media} renderItem={renderItem} />
                </div>
            </div>
        );
    }
});

module.exports = RecentMedia;
<commit_msg>Module title should probably be h2, not p<commit_after>var React = require('react');

var RecentStore = require('../../../stores/RecentStore');
var StoreWatchMixin = require('../../../mixins/StoreWatchMixin');

var Paginator = require('../../../components/Paginator');

/**
 * Displays recent media.
 */

var RecentMedia = React.createClass({

    propTypes: {
        type: React.PropTypes.string.isRequired,
        renderItem: React.PropTypes.func.isRequired
    },

    mixins: [StoreWatchMixin(RecentStore)],

    getStateFromStore: function() {
        return {
            media: RecentStore.getRecent(this.props.type)
        };
    },

    render: function() {
        var type = this.props.type;
        var renderItem = this.props.renderItem;

        return (
            <div className="module module-recent">
                <h2 className="module--title">Recent {type.charAt(0).toUpperCase() + type.slice(1)}</h2>
                <div className="module-recent--list">
                    <Paginator items={this.state.media} renderItem={renderItem} />
                </div>
            </div>
        );
    }
});

module.exports = RecentMedia;

{'fraction_non_alphanumeric': 0.15515734265734266, 'fraction_numerical': 0.0030594405594405595, 'mean_word_length': 2.233050847457627, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1085812', 'n_tokens_mistral': 676, 'n_tokens_neox': 643, 'n_words': 117}