<commit_before>import React from 'react'
import HighLight from '../app/HighLight'
import { TagsClasses, TagsProps, useCustomRendering } from '../customise/CustomRendering'
import styles from './Tags.module.scss'

const Tags: React.FunctionComponent<TagsProps> = (props) => {
  const Customised = useCustomRendering<TagsProps, TagsClasses>('Tags', styles)
  if (typeof Customised === 'function') {
    return <Customised {...props} />
  }
  return (
    <ul className={Customised.tags}>
      {props.tags.map((tag, index) => (
        <li className={Customised.tag} key={index}>
          <HighLight text={tag.name} />
        </li>
      ))}
    </ul>
  )
}

export default Tags<commit_msg>dont render a tags list if no tags<commit_after>import React from 'react'
import HighLight from '../app/HighLight'
import { TagsClasses, TagsProps, useCustomRendering } from '../customise/CustomRendering'
import styles from './Tags.module.scss'

const Tags: React.FunctionComponent<TagsProps> = (props) => {
  const Customised = useCustomRendering<TagsProps, TagsClasses>('Tags', styles)
  if (typeof Customised === 'function') {
    return <Customised {...props} />
  }
  if (!props.tags.length) {
    return null
  }
  return (
    <ul className={Customised.tags}>
      {props.tags.map((tag, index) => (
        <li className={Customised.tag} key={index}>
          <HighLight text={tag.name} />
        </li>
      ))}
    </ul>
  )
}

export default Tags
{'fraction_non_alphanumeric': 0.15251897860593513, 'fraction_numerical': 0.0, 'mean_word_length': 3.4207317073170733, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '1363190', 'n_tokens_mistral': 447, 'n_tokens_neox': 452, 'n_words': 108}