<commit_before>import React from 'react'
import PropTypes from 'prop-types'

import Facet from '../facet'

const Oraganizations = ({ catalog: { name, metrics: { records: { counts } } } }) => (
  <div>
    {Object.entries(counts.organizations).map(([value, count]) => (
      <span key={value}>
        <Facet defaultQuery={{
          catalog: name
        }} facet={{
          name: 'organization',
          value
        }} count={count} />
      </span>
    ))}

    <style jsx>{`
      div {
        margin-top: 10px;
      }

      span {
        display: inline-block;
        margin: 0 15px 10px 0;

        @media (max-width: 551px) {
          display: block;
          margin-right: 0;
        }
      }
    `}</style>
  </div>
)

Oraganizations.propTypes = {
  catalog: PropTypes.shape({
    name: PropTypes.string.isRequired,
    metrics: PropTypes.shape({
      records: PropTypes.shape({
        counts: PropTypes.shape({
          organizations: PropTypes.object.isRequired
        }).isRequired
      }).isRequired
    }).isRequired
  }).isRequired
}

export default Oraganizations<commit_msg>Fix tags overflowing on catalogs page<commit_after>import React from 'react'
import PropTypes from 'prop-types'

import Facet from '../facet'

const Oraganizations = ({ catalog: { name, metrics: { records: { counts } } } }) => (
  <div>
    {Object.entries(counts.organizations).map(([value, count]) => (
      <span key={value}>
        <Facet defaultQuery={{
          catalog: name
        }} facet={{
          name: 'organization',
          value
        }} count={count} />
      </span>
    ))}

    <style jsx>{`
      div {
        margin-top: 10px;
      }

      span {
        display: inline-block;
        margin: 0 15px 10px 0;
        max-width: 100%;

        @media (max-width: 551px) {
          display: block;
          margin-right: 0;
        }
      }
    `}</style>
  </div>
)

Oraganizations.propTypes = {
  catalog: PropTypes.shape({
    name: PropTypes.string.isRequired,
    metrics: PropTypes.shape({
      records: PropTypes.shape({
        counts: PropTypes.shape({
          organizations: PropTypes.object.isRequired
        }).isRequired
      }).isRequired
    }).isRequired
  }).isRequired
}

export default Oraganizations
{'fraction_non_alphanumeric': 0.13914575077058564, 'fraction_numerical': 0.011889035667107, 'mean_word_length': 2.074424898511502, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '5610536', 'n_tokens_mistral': 701, 'n_tokens_neox': 685, 'n_words': 158}