<commit_before>import React from 'react';
import Dropdown from './form/dropdown.jsx';
import Fieldset from './elements/fieldset.jsx';
import { connect } from '../store/connect';
import { localize } from '../../../../_common/localize';

const last_digit_numbers = [...Array(10).keys()].map(number => ({
    text : number,
    value: number,
}));

const LastDigit = ({
    last_digit,
    onChange,
    is_nativepicker,
    is_minimized,
}) =>  {
    if (is_minimized) {
        return (
            <div className='fieldset-minimized'>
                <span className='icon digits' />
                {last_digit}
            </div>
        );
    }
    return (
        <Fieldset
            header={localize('Last Digit Prediction')}
            icon='digits'
            tooltip={localize('Text for Last Digits goes here.')}
        >
            <Dropdown
                list={last_digit_numbers}
                value={last_digit}
                name='last_digit'
                onChange={onChange}
                is_nativepicker={is_nativepicker}
            />
        </Fieldset>
    );
};

export default connect(
    ({trade}) => ({
        last_digit: trade.last_digit,
        onChange  : trade.handleChange,
    })
)(LastDigit);
<commit_msg>add "last digit" to minimized version<commit_after>import React from 'react';
import Dropdown from './form/dropdown.jsx';
import Fieldset from './elements/fieldset.jsx';
import { connect } from '../store/connect';
import { localize } from '../../../../_common/localize';

const last_digit_numbers = [...Array(10).keys()].map(number => ({
    text : number,
    value: number,
}));

const LastDigit = ({
    last_digit,
    onChange,
    is_nativepicker,
    is_minimized,
}) =>  {
    if (is_minimized) {
        return (
            <div className='fieldset-minimized'>
                <span className='icon digits' />
                {`Last Digit: ${last_digit}`}
            </div>
        );
    }
    return (
        <Fieldset
            header={localize('Last Digit Prediction')}
            icon='digits'
            tooltip={localize('Text for Last Digits goes here.')}
        >
            <Dropdown
                list={last_digit_numbers}
                value={last_digit}
                name='last_digit'
                onChange={onChange}
                is_nativepicker={is_nativepicker}
            />
        </Fieldset>
    );
};

export default connect(
    ({trade}) => ({
        last_digit: trade.last_digit,
        onChange  : trade.handleChange,
    })
)(LastDigit);

{'fraction_non_alphanumeric': 0.1401174168297456, 'fraction_numerical': 0.0015655577299412916, 'mean_word_length': 1.8654708520179373, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '6814525', 'n_tokens_mistral': 772, 'n_tokens_neox': 737, 'n_words': 149}