<commit_before>import _ from 'lodash'
import React, { PropTypes } from 'react'

import ComponentDescription from './ComponentDescription'
import ComponentExamples from './ComponentExamples'
import ComponentProps from './ComponentProps'
import docgenInfo from '../../docgenInfo.json'

const ComponentDoc = ({ _meta }) => {
  // TODO remove docgetInfo searching in favor of separate docgen.json in each component directory
  // this just parses out a single docgen file based on component path name
  // our current docgen gulp task concats these into one, only for us to split it back out
  const docPath = _.find(_.keys(docgenInfo), path => new RegExp(`${_meta.name}.js$`).test(path))
  const docgen = docgenInfo[docPath]

  return (
    <div>
      <ComponentDescription
        _meta={_meta}
        docgen={docgen}
        docPath={docPath}
      />
      <ComponentProps props={docgen.props} />
      {docgen.props && <ComponentProps props={docgen.props} />}
      <ComponentExamples name={_meta.name} />
    </div>
  )
}

ComponentDoc.propTypes = {
  _meta: PropTypes.object,
}

export default ComponentDoc<commit_msg>fix(ComponentDoc) : remove duplicate props<commit_after>import _ from 'lodash'
import React, { PropTypes } from 'react'

import ComponentDescription from './ComponentDescription'
import ComponentExamples from './ComponentExamples'
import ComponentProps from './ComponentProps'
import docgenInfo from '../../docgenInfo.json'

const ComponentDoc = ({ _meta }) => {
  // TODO remove docgetInfo searching in favor of separate docgen.json in each component directory
  // this just parses out a single docgen file based on component path name
  // our current docgen gulp task concats these into one, only for us to split it back out
  const docPath = _.find(_.keys(docgenInfo), path => new RegExp(`${_meta.name}.js$`).test(path))
  const docgen = docgenInfo[docPath]

  return (
    <div>
      <ComponentDescription
        _meta={_meta}
        docgen={docgen}
        docPath={docPath}
      />
      {docgen.props && <ComponentProps props={docgen.props} />}
      <ComponentExamples name={_meta.name} />
    </div>
  )
}

ComponentDoc.propTypes = {
  _meta: PropTypes.object,
}

export default ComponentDoc
{'fraction_non_alphanumeric': 0.11126065500224316, 'fraction_numerical': 0.0, 'mean_word_length': 3.6652719665271967, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, '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': '5004761', 'n_tokens_mistral': 634, 'n_tokens_neox': 629, 'n_words': 198}