<commit_before>import React, { PropTypes } from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { ListItem } from 'material-ui'
import { green500 } from 'material-ui/styles/colors'
import TimeAgo from 'timeago-react'
import { push } from 'react-router-redux'
import style from './topic.css'
import { getTagFromTopic } from '../../utils'

const Topic = props => (
  <Link to={`/topic/${props.id}`}>
    <ListItem innerDivStyle={{ display: 'flex', borderBottom: '1px solid #ccc' }}>
      <img
        className={style.avatar}
        src={props.author.avatar_url} alt={props.author.loginname}
        onClick={(e) => {
          e.preventDefault()
          props.dispatch(push(`/user/${props.author.loginname}`))
        }}
      />
      <div className={style.content}>
        <h3>{props.title}</h3>
        <div className={style.extra}>
          <div className={style.left}>
            <div className={style.tag} style={{ backgroundColor: green500 }}>{getTagFromTopic(props)}</div>
            <div className={style.count}>
              <strong>{props.reply_count}</strong> / {props.visit_count}
            </div>
          </div>
          <TimeAgo
            datetime={props.last_reply_at}
            locale="zh_CN"
          />
        </div>
      </div>
    </ListItem>
  </Link>
)

Topic.propTypes = {
  id: PropTypes.string.isRequired,
  author: PropTypes.shape({
    avatar_url: PropTypes.string.isRequired,
    loginname: PropTypes.string.isRequired,
  }).isRequired,
  reply_count: PropTypes.number.isRequired,
  visit_count: PropTypes.number.isRequired,
  title: PropTypes.string.isRequired,
  last_reply_at: PropTypes.string.isRequired,
  dispatch: PropTypes.func.isRequired,
}

export default connect()(Topic)<commit_msg>Do not live reload time<commit_after>import React, { PropTypes } from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { ListItem } from 'material-ui'
import { green500 } from 'material-ui/styles/colors'
import TimeAgo from 'timeago-react'
import { push } from 'react-router-redux'
import style from './topic.css'
import { getTagFromTopic } from '../../utils'

const Topic = props => (
  <Link to={`/topic/${props.id}`}>
    <ListItem innerDivStyle={{ display: 'flex', borderBottom: '1px solid #ccc' }}>
      <img
        className={style.avatar}
        src={props.author.avatar_url} alt={props.author.loginname}
        onClick={(e) => {
          e.preventDefault()
          props.dispatch(push(`/user/${props.author.loginname}`))
        }}
      />
      <div className={style.content}>
        <h3>{props.title}</h3>
        <div className={style.extra}>
          <div className={style.left}>
            <div className={style.tag} style={{ backgroundColor: green500 }}>{getTagFromTopic(props)}</div>
            <div className={style.count}>
              <strong>{props.reply_count}</strong> / {props.visit_count}
            </div>
          </div>
          <TimeAgo
            datetime={props.last_reply_at}
            locale="zh_CN"
            live={false}
          />
        </div>
      </div>
    </ListItem>
  </Link>
)

Topic.propTypes = {
  id: PropTypes.string.isRequired,
  author: PropTypes.shape({
    avatar_url: PropTypes.string.isRequired,
    loginname: PropTypes.string.isRequired,
  }).isRequired,
  reply_count: PropTypes.number.isRequired,
  visit_count: PropTypes.number.isRequired,
  title: PropTypes.string.isRequired,
  last_reply_at: PropTypes.string.isRequired,
  dispatch: PropTypes.func.isRequired,
}

export default connect()(Topic)
{'fraction_non_alphanumeric': 0.15015265056897031, 'fraction_numerical': 0.004995836802664446, 'mean_word_length': 2.8586723768736615, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 47, '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': '1980829', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1125, 'n_words': 216}