<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';

import getText from '../utils/getText';
import Button from '../../react-chayns-button/component/Button';

export default class LoadMore extends Component {
    static propTypes = {
        onClick: PropTypes.func.isRequired,
        type: PropTypes.string.isRequired,
    };

    handleOnClick = () => {
        const { onClick, type } = this.props;

        if (onClick) {
            onClick(type);
        }
    };

    render() {
        return (
            <div
                className="load-more"
                style={{
                    display: 'flex',
                    justifyContent: 'center',
                    padding: '20px 0',
                }}
            >
                <Button
                    onClick={this.handleOnClick}
                >
                    {getText('LOAD_MORE')}
                </Button>
            </div>
        );
    }
}<commit_msg>:recycle: Use React hooks for LoadMore<commit_after>import React, { useCallback } from 'react';
import PropTypes from 'prop-types';

import getText from '../utils/getText';
import Button from '../../react-chayns-button/component/Button';

const LoadMore = ({ onClick, type }) => {
    const handleClick = useCallback(() => {
        if (onClick) {
            onClick(type);
        }
    }, [onClick, type]);

    return (
        <div
            className="load-more"
            style={{
                display: 'flex',
                justifyContent: 'center',
                padding: '20px 0',
            }}
        >
            <Button
                onClick={handleClick}
            >
                {getText('LOAD_MORE')}
            </Button>
        </div>
    );
};

LoadMore.propTypes = {
    onClick: PropTypes.func.isRequired,
    type: PropTypes.string.isRequired,
};

export default LoadMore;
{'fraction_non_alphanumeric': 0.12598425196850394, 'fraction_numerical': 0.0031496062992125984, 'mean_word_length': 1.4882506527415145, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, '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': '5446319', 'n_tokens_mistral': 509, 'n_tokens_neox': 499, 'n_words': 112}