<commit_before>import React, { PropTypes } from 'react'
import { BaseComponent } from 'shared/components'
import moment from 'moment'
import counterpart from 'counterpart'
import GMap from 'shared/components/addon/maps/gmap'

const { CSSTransitionGroup } = React.addons

export default class Post extends BaseComponent {

  constructor (props) {
    super(props)

    counterpart.onLocaleChange(::this.handleLocaleChange)
    this.releaseTimeout = undefined
  }

  static propTypes = {
    post: PropTypes.object.isRequired,
    map: PropTypes.object.isRequired,
    params: PropTypes.object.isRequired,
    setPin: PropTypes.func.isRequired
  }

  static contextTypes = {
    router: PropTypes.object.isRequired
  }

  handleLocaleChange (newLocale) {

  }

  componentWillUnmount () {
    if (this.op)
      clearTimeout(this.releaseTimeout)
  }

  render () {
    const Translate = require('react-translate-component')
    const { content } = this.props.post

    return (
      <main className="ui two column stackable centered page grid">
        <div className="column">
          <div className="ui fluid card">
            <div className="content">
              <i className="right floated like icon"></i>
              <i className="right floated star icon"></i>
              <div className="header">{content.title}</div>
              <div className="description">
                <p>{content.content}</p>
              </div>
            </div>
            <div className="extra content">
              <span className="left floated like">
                <i className="like icon"></i>
                Like
              </span>
              <span className="right floated star">
                <i className="star icon"></i>
                Favorite
              </span>
            </div>
          </div>
        </div>
        <div className="column">
          <GMap
            ref="gmap"
            {...this.props.map}
          />
        </div>
      </main>
    )
  }
}
<commit_msg>hide map if no latlng<commit_after>import React, { PropTypes } from 'react'
import { BaseComponent } from 'shared/components'
import moment from 'moment'
import counterpart from 'counterpart'
import GMap from 'shared/components/addon/maps/gmap'

const { CSSTransitionGroup } = React.addons

export default class Post extends BaseComponent {

  constructor (props) {
    super(props)

    counterpart.onLocaleChange(::this.handleLocaleChange)
    this.releaseTimeout = undefined
  }

  static propTypes = {
    post: PropTypes.object.isRequired,
    map: PropTypes.object.isRequired,
    params: PropTypes.object.isRequired,
    setPin: PropTypes.func.isRequired
  }

  static contextTypes = {
    router: PropTypes.object.isRequired
  }

  handleLocaleChange (newLocale) {

  }

  componentWillUnmount () {
    if (this.op)
      clearTimeout(this.releaseTimeout)
  }

  render () {
    const Translate = require('react-translate-component')
    const { content } = this.props.post

    return (
      <main className="ui two column stackable centered page grid">
        <div className="column">
          <div className="ui fluid card">
            <div className="content">
              <i className="right floated like icon"></i>
              <i className="right floated star icon"></i>
              <div className="header">{content.title}</div>
              <div className="description">
                <p>{content.content}</p>
              </div>
            </div>
            <div className="extra content">
              <span className="left floated like">
                <i className="like icon"></i>
                Like
              </span>
              <span className="right floated star">
                <i className="star icon"></i>
                Favorite
              </span>
            </div>
          </div>
        </div>
        <div className="column">
        { (content.lat && content.lat) &&
          <GMap
            ref="gmap"
            {...this.props.map}
          />
        }
        </div>
      </main>
    )
  }
}

{'fraction_non_alphanumeric': 0.11776251226692837, 'fraction_numerical': 0.0, 'mean_word_length': 2.004421518054532, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '3304031', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1084, 'n_words': 262}