<commit_before>import moment from 'moment';
import React from 'react';
import {
  Image,
  StyleSheet,
  Text,
  TouchableHighlight,
  View,
} from 'react-native';

import utils from './../../lib/utils';
import Detail from './Detail';

const styles = StyleSheet.create({
  viewRow: {
    flexDirection: 'row',
    backgroundColor: 'white',
    padding: 10,
  },
  viewAvatar: {
    flex: 1,
  },
  viewDetails: {
    flex: 4.5,
    paddingHorizontal: 10,
  },
  viewEth: {
    flex: 1.5,
  },
  txtTitle: {
    fontSize: 16,
  },
  txtTime: {
    fontSize: 14,
    paddingTop: 2,
    color: '#666',
  },
  txtDescription: {
    fontSize: 12,
    color: '#999',
    paddingTop: 2,
  },
  txtValuePositive: {
    textAlign: 'right',
    color: '#87B757',
  },
  txtValueNegative: {
    textAlign: 'right',
    color: '#FD677C',
  },
  imgIcon: {
    height: 50,
    width: 50,
    borderRadius: 25,
    borderColor: '#ccc',
    borderWidth: 1,
  },
});

// export default function TransactionRow(props) {
export default class TransactionRow extends React.Component {
  constructor(props) {
    super(props);

    this.viewDetail = this.viewDetail.bind(this);
  }

  viewDetail(prepped) {
    this.props.navigator.push({
      component: Detail,<commit_msg>Prevent from clicking on demo tx<commit_after>import moment from 'moment';
import React from 'react';
import {
  Image,
  StyleSheet,
  Text,
  TouchableHighlight,
  View,
} from 'react-native';

import utils from './../../lib/utils';
import Detail from './Detail';

const styles = StyleSheet.create({
  viewRow: {
    flexDirection: 'row',
    backgroundColor: 'white',
    padding: 10,
  },
  viewAvatar: {
    flex: 1,
  },
  viewDetails: {
    flex: 4.5,
    paddingHorizontal: 10,
  },
  viewEth: {
    flex: 1.5,
  },
  txtTitle: {
    fontSize: 16,
  },
  txtTime: {
    fontSize: 14,
    paddingTop: 2,
    color: '#666',
  },
  txtDescription: {
    fontSize: 12,
    color: '#999',
    paddingTop: 2,
  },
  txtValuePositive: {
    textAlign: 'right',
    color: '#87B757',
  },
  txtValueNegative: {
    textAlign: 'right',
    color: '#FD677C',
  },
  imgIcon: {
    height: 50,
    width: 50,
    borderRadius: 25,
    borderColor: '#ccc',
    borderWidth: 1,
  },
});

// export default function TransactionRow(props) {
export default class TransactionRow extends React.Component {
  constructor(props) {
    super(props);

    this.viewDetail = this.viewDetail.bind(this);
  }

  viewDetail(prepped) {
    if (this.props.transaction.demo) {
      return false;
    }

    return this.props.navigator.push({
      component: Detail,
{'fraction_non_alphanumeric': 0.14615384615384616, 'fraction_numerical': 0.02923076923076923, 'mean_word_length': 2.808199121522694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1347396', 'n_tokens_mistral': 964, 'n_tokens_neox': 888, 'n_words': 211}