<commit_before>import React, { PropTypes } from 'react';
import { M, NumberPlain, NumberColored } from '../_common';

const PortfolioRow = ({ compact, contract, proposal, onViewDetails }) => (
    <tr onClick={() => onViewDetails(contract)}>
        <td>{contract.contract_id}</td>
        <td><NumberPlain currency={contract.currency} value={contract.buy_price} /></td>
        <td>{proposal && <NumberColored currency={contract.currency} value={proposal.bid_price} isProfit={v => v - contract.buy_price} />}</td>
        {!compact &&
            <td>
                <button onClick={() => onViewDetails(contract)}>
                    <M m="View" />
                </button>
            </td>
        }
    </tr>
);

PortfolioRow.propTypes = {<commit_msg>Show transaction ID instead of contract id, following binary.com<commit_after>import React, { PropTypes } from 'react';
import { M, NumberPlain, NumberColored } from '../_common';

const PortfolioRow = ({ compact, contract, proposal, onViewDetails }) => (
    <tr onClick={() => onViewDetails(contract)}>
        <td>{contract.transaction_id}</td>
        <td><NumberPlain currency={contract.currency} value={contract.buy_price} /></td>
        <td>{proposal && <NumberColored currency={contract.currency} value={proposal.bid_price} isProfit={v => v - contract.buy_price} />}</td>
        {!compact &&
            <td>
                <button onClick={() => onViewDetails(contract)}>
                    <M m="View" />
                </button>
            </td>
        }
    </tr>
);

PortfolioRow.propTypes = {
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0, 'mean_word_length': 2.675233644859813, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 41, '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': '4506172', 'n_tokens_mistral': 460, 'n_tokens_neox': 451, 'n_words': 96}